Apifox API Documentation

website·Indexed 35 days ago

https://hemvk3oefq.apifox.cn/

API documentation and specifications managed via Apifox, featuring OpenAPI Specification 3.0.1 definitions for various services, including pet store management, user authentication, and order processing.

Tokens
13.6K
Snippets
63
Records
79
Agent score
49%

What's inside Apifox

  1. Overview of Apifox API Collaboration Platform

    Apifox is an integrated collaboration platform that combines API documentation, API debugging, API Mocking, and API automated testing. It is designed to replace the need for multiple separate tools like Postman, Swagger, Mock servers, and JMeter. It serves the entire R&D technical team, specifically backend developers, frontend developers, and testers.
  2. Retrieve product and influencer data via /max endpoint

    The /max endpoint provides a GET request that returns a list of product and influencer data. The response is a JSON object containing a status code and a data array. Each item in the data array contains detailed information about a product (basicProduct), the associated influencer (influencer), and collaboration details (collaboration).
    # GET /max
    # Response Body (application/json):
    {
      "code": 0,
      "data": [
        {
          "basicProduct": {
            "productId": "string",
            "goodsName": "string",
            "price": "string",
            "skuCode": "string",
            "brandName": "string",
            "cateName": "string",
            "status": boolean,
            "cnt": integer,
            "updateTime": integer,
            "createTime": integer
            # ... other product attributes
          },
          "influencer": {
            "influencerId": "string",
            "influencerName": "string",
            "wechatAccount": "string",
            "mobile": "string",
            "influencerLevel": "string",
            "avatar": "string",
            "createTime": integer
            # ... other influencer attributes
          },
          "collaboration": {
            "influencerId": "string",
            "supplierId": "string",
            "proposalPrice": integer,
            "finishTime": integer,
            "recommendation": "string"
          }
        }
      ]
    }
  3. Order object schema definition

    The Order object is defined as a schema containing details about a pet order. It includes identifiers for the order and the pet, quantity, shipping date, the current status of the order, and a completion flag. The status field is restricted to a specific set of enumerated values: placed, approved, and delivered.
    Order:
      type: object
      properties:
        id:
          type: integer
          format: int64
        petId:
          type: integer
          format: int64
        quantity:
          type: integer
          format: int32
        shipDate:
          type: string
          format: date-time
        status:
          type: string
          description: Order Status
          enum:
            - placed
            - approved
            - delivered
        complete:
          type: boolean
  4. Understand the Transport and Equipment Event data structures

    The service provides detailed tracking information for shipments, including transport calls and equipment events.

    Transport Call Data: Includes details about the loading and discharging locations, transport category (e.g., VESSEL), voyage identifiers, and vessel details (Name, MMSI, IMO). Location objects contain locationCode, portTimeZone, coordinates (lat, lon), and port names in English and Chinese.

    Equipment Event Data: Tracks the lifecycle of a container. Key fields include:

    • eventClassifier: The type of event (e.g., ACT for actual).
    • eventCategory: The category of the event (e.g., EQUIPMENT).
    • eventTime: Timestamp of the occurrence.
    • equipmentIndicator: Indicates if the equipment is EMPTY or LADEN.
    • equipmentEventCategory: Specific event codes such as GTOT (Empty to Shipper), GTIN (Received at CY), or LOAD (Loaded on Vessel).
    • equipment: Contains the equipmentCode (container number).
    transports:
      - loadTransportCall:
          location:
            locationCode: CNSHA
            portTimeZone: '8'
            lat: 30.626079
            lon: 122.056926
        transportCategory: VESSEL
        voyage: GJ525W
        vessel:
          vesselName: MSC MICHELLE
          mmsi: 636020599
          imo: 9897016
    equipmentEvents:
      - eventClassifier: ACT
        eventTime: '2025-06-21 00:00:00'
        description: Empty to Shipper
        equipmentIndicator: EMPTY
        equipmentEventCategory: GTOT
        equipment:
          equipmentCode: MSNU3751242
  5. User Profile and Resource Data Schema

    The lastModifyUser object provides detailed information about a user, including their identity, contact details, and associated resources and roles. This is typically nested within collaborationPhrases.
    lastModifyUser:
      type: object
      properties:
        supplierName: { type: string }
        supplierId: { type: string }
        sex: { type: string }
        birth: { type: string }
        externalId: { type: string }
        empNo: { type: string }
        avatar: { type: string }
        userId: { type: string }
        feiShuId: { type: string }
        phoneCountryCode: { type: string }
        phone: { type: string }
        name: { type: string }
        nickname: { type: string }
        tenantId: { type: string }
        userType: { type: string }
        email: { type: string }
        resourceDTOS: # Array of resource objects
          type: array
          items:
            type: object
            properties:
              resourceId: { type: string }
              resourceCode: { type: string }
              level: { type: integer }
              icon: { type: string }
              resourceName: { type: string }
              text: { type: string }
              sorts: { type: integer }
              url: { type: string }
              parentId: { type: string }
              selected: { type: boolean }
              resourceType: { type: string }
        roleDTOS: # Array of role objects
          type: array
          items:
            type: object
            properties:
              roleId: { type: string }
              roleCode: { type: string }
              roleName: { type: string }
              description: { type: string }
              isAdmin: { type: boolean }
              roleGroup: { type: string }
  6. Apifox capabilities by user role

    Apifox provides specific workflows based on the developer's role:

    • Backend Developers: API design and creation, API debugging, automated testing, and backend code generation.
    • Frontend Developers: API design and creation, API data mocking, API debugging, and frontend code generation.
    • QA/Testers: API debugging and API automated testing.
  7. Requirement and Collaboration data structures

    The API utilizes complex nested objects to manage promotion requirements and influencer collaborations. Key entities include:

    • Requirement: Contains promotion details such as promotionType, targetInfluencerCount, requirementBudget, and basicProduct (which includes SKU and category information).
    • CollaborationContent: Tracks the performance of a specific piece of content, including playCount, impressions, cpm, cpa3, and deliveryCost.
    • Participants: A list of users associated with a requirement, including their allocationWeight and participantRole (e.g., executor).
    • User/Role: Detailed user profiles including roleDTOS which map permissions and resource access (e.g., resourceType: menu).
  8. Data schema for Requirement and BasicProduct objects

    The API defines a requirement object used to track promotion needs and a nested basicProduct object for detailed product specifications.

    Requirement Object Properties:

    • requirementName (string)
    • promotionType (string)
    • attachments (array of strings)
    • productId (string)
    • isSpecialRequirement (boolean)
    • promotionStartTime (integer)
    • description (string)
    • updateTime (integer)
    • targetInfluencerCount (integer)
    • requirementCategory (string)
    • promotionChannel (string)
    • targetImpressions (integer)
    • createTime (integer)
    • targetDeadline (integer)

    BasicProduct Object Properties: Includes comprehensive product metadata such as goodsName, skuCode, price, brandName, productId, saleStatus, and category codes (cateCodeL1 through L3 and their corresponding names).

    requirement:
      type: object
      properties:
        requirementName: { type: string }
        promotionType: { type: string }
        attachments: { type: array, items: { type: string } }
        productId: { type: string }
        isSpecialRequirement: { type: boolean }
        promotionStartTime: { type: integer }
        description: { type: string }
        updateTime: { type: integer }
        targetInfluencerCount: { type: integer }
        requirementCategory: { type: string }
        basicProduct:
          type: object
          properties:
            goodsName: { type: string }
            skuCode: { type: string }
            price: { type: string }
            productId: { type: string }
            # ... other product fields
  9. Data schema for Recruitment Requirements

    The recruitment requirement object defines the constraints and metadata for a promotion campaign. It includes timing, budgeting, and a list of participants. Key required fields include requirementId, requirementBudget, promotionStartTime, promotionEndTime, and status.
    {
      "requirementName": "string",
      "promotionType": "string",
      "attachments": "string",
      "productId": "string",
      "isSpecialRequirement": "boolean",
      "promotionStartTime": "integer",
      "description": "string",
      "updateTime": "integer",
      "targetInfluencerCount": "integer",
      "requirementCategory": "string",
      "basicProduct": "string",
      "promotionChannel": "string",
      "targetImpressions": "integer",
      "createTime": "integer",
      "targetDeadline": "integer",
      "finishedTime": "integer",
      "requirementId": "string",
      "requirementBudget": "integer",
      "promotionEndTime": "integer",
      "recruitRuleMetadataId": "string",
      "status": "string",
      "participants": [
        {
          "participantId": "string",
          "allocationWeight": "integer",
          "name": "string",
          "nickname": "string",
          "avatar": "string",
          "requirementId": "string",
          "participantRole": "string"
        }
      ]
    }
  10. Request and Response schema for findPetsByTags

    The findPetsByTags operation requires a mandatory tags query parameter (array of strings).

    Responses:

    • 200 OK: Returns an array of Pet objects. A Pet object includes id (int64), category (Category object), name (string), photoUrls (array of strings), tags (array of Tag objects), and status (enum: available, pending, sold).
    • 400 Bad Request: Returned when an invalid tag value is provided.

    Security: Requires petstore_auth with scopes read:pets and write:pets.

  11. Authenticate requests to the c service

    The API requires Bearer token authentication. Requests must include a valid bearer token in the authorization header.
    Authorization: Bearer <your_token>
  12. Configure bearer token security for Category API

    The API requires authentication using a Bearer token. This is defined in the securitySchemes under the name bearer using the HTTP bearer scheme.
    components:
      securitySchemes:
        bearer:
          type: http
          scheme: bearer
    security:
      - bearer: []