> ## Documentation Index
> Fetch the complete documentation index at: https://api.skycoach.gg/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage offer (create or edit with automatic status determination)

> Create or edit offers with full field validation including custom data fields. Status is automatically determined based on validation results and account capabilities. Status field is prohibited in request - it will be set automatically.
     *
     **Automatic status determination:**
     * - **Gold marketplace**: Always set to Active if validation passes
     * - **Account marketplace**:
     * - If data field validation fails → Need Details
     * - If MULTIPLE credential system and no active credentials → Not Active
     * - If all validations pass → On Review (for moderation)
     *
     **Operation type (add/edit):**
     * - Operation type is determined automatically by presence of 'id' field in offer object
     * - If 'id' is present → edit operation (only provided fields will be updated)
     * - If 'id' is missing → add operation (all required fields must be provided)
     *
     * Edit existing offers or create new ones. Each offer is validated and processed separately. Results are returned as an array with status for each offer.



## OpenAPI

````yaml /api-docs.json post /api/shop/marketplace/products/{productId}/offers/manage
openapi: 3.0.0
info:
  title: Currency Marketplace API
  description: API documentation for Currency Marketplace
  version: 1.0.0
servers:
  - url: https://skycoach.gg/
    description: API Server
security: []
tags:
  - name: Currency Marketplace
    description: Currency Marketplace
  - name: Offers
    description: Offers
  - name: Offer Credentials
    description: Offer Credentials
paths:
  /api/shop/marketplace/products/{productId}/offers/manage:
    post:
      tags:
        - Offers
      summary: Manage offer (create or edit with automatic status determination)
      description: >-
        Create or edit offers with full field validation including custom data
        fields. Status is automatically determined based on validation results
        and account capabilities. Status field is prohibited in request - it
        will be set automatically.
             *
             **Automatic status determination:**
             * - **Gold marketplace**: Always set to Active if validation passes
             * - **Account marketplace**:
             * - If data field validation fails → Need Details
             * - If MULTIPLE credential system and no active credentials → Not Active
             * - If all validations pass → On Review (for moderation)
             *
             **Operation type (add/edit):**
             * - Operation type is determined automatically by presence of 'id' field in offer object
             * - If 'id' is present → edit operation (only provided fields will be updated)
             * - If 'id' is missing → add operation (all required fields must be provided)
             *
             * Edit existing offers or create new ones. Each offer is validated and processed separately. Results are returned as an array with status for each offer.
      operationId: 57638bf7ff98bce61d4830ee104bd885
      parameters:
        - name: Accept
          in: header
          description: API response format
          required: true
          schema:
            type: string
            default: application/json
            enum:
              - application/json
        - name: productId
          in: path
          description: Product currency marketplace ID
          required: true
          schema:
            type: integer
            example: 13
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManageOfferRequest'
            example:
              offers:
                - price_per_step: 2
                  amount: 1
                  min_purchase_amount: '1'
                  data:
                    '69': []
                    '70': []
                    '71': Grandmaster
                    '72': Brazil
                    '73': 7005
                    '74': Handmade
                    '78': 1
                    '204': 200
                  marketplace_type: 2
                  is_auto_activate_status: true
                  outer_name: LoL Account with Rare Skins
                  internal_name: LoL_Account_001
                  description: Account with Officer Vi and Pharaoh Amumu skins
                  credential_system_type_id: 1
                  search_description: LoL account with rare skins
                - id: 336372
                  price_per_step: 2
                  amount: 1
                  min_purchase_amount: '1'
                  data:
                    '69': []
                    '70': []
                    '71': Grandmaster
                    '72': Brazil
                    '73': 7005
                    '74': Handmade
                    '78': 1
                    '204': 200
                  marketplace_type: 2
                  is_auto_activate_status: true
                  outer_name: LoL Account with Rare Skins
                  internal_name: LoL_Account_001
                  description: Account with Officer Vi and Pharaoh Amumu skins
                  credential_system_type_id: 1
                  search_description: LoL account with rare skins
              guarantee_delivery_time: 1-2 hours
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                properties:
                  result:
                    properties:
                      message:
                        type: string
                        example: ok
                      received:
                        description: Total number of offers received in request
                        type: integer
                        example: 3
                      successfully:
                        description: Number of offers successfully processed
                        type: integer
                        example: 2
                      results:
                        description: Array of results for each offer
                        type: array
                        items:
                          properties:
                            id:
                              type: integer
                              example: 335838
                              nullable: true
                            status:
                              type: string
                              example: ok
                            message:
                              type: string
                              example: Failed to process offer
                              nullable: true
                          type: object
                    type: object
                type: object
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Validation error. (and 3 more errors)
                  errors:
                    type: object
                    example:
                      offers.0.price_per_step:
                        - The offers.0.price_per_step field must be a number.
                      offers.0.data.71:
                        - error: 'Invalid value for field: Rank'
                          type: string
                          allowed_values:
                            - Challenger
                            - Grandmaster
                            - Master
                            - Diamond
                            - Silver
                            - Bronze
                            - Emerald
                            - Platinum
                            - Iron
                            - Gold
                      offers.0.data.74:
                        - error: 'Invalid value for field: Leveling'
                          type: string
                          allowed_values:
                            - Handmade
                            - Automated
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Unauthorized
                type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: Forbidden
                type: object
        '429':
          description: >-
            Rate limit exceeded. Maximum 100 offers per request and 200 offers
            per minute per user.
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                    example: 'Rate limit exceeded: max 200 offers per minute.'
                  budget_used:
                    description: >-
                      Number of offers already processed in the current minute
                      window
                    type: integer
                    example: 180
                  budget_limit:
                    description: Maximum offers allowed per minute
                    type: integer
                    example: 200
                  offers_requested:
                    description: Number of offers in the rejected request
                    type: integer
                    example: 50
                type: object
      security:
        - bearerAuth: []
components:
  schemas:
    ManageOfferRequest:
      required:
        - offers
        - guarantee_delivery_time
      properties:
        offers:
          description: >-
            Array of offers to create or update. If an offer object contains
            'id', it will be updated. If 'id' is missing, a new offer will be
            created. Maximum 100 offers per request.
          type: array
          items:
            properties:
              id:
                description: >-
                  Offer ID. If provided, the offer will be updated. If missing,
                  a new offer will be created.
                type: integer
                example: 335838
                nullable: true
              price_per_step:
                description: >-
                  Price per step. For account marketplace: minimum 0.1, maximum
                  2000000000. For gold marketplace: minimum 0.0001, maximum
                  2000000000
                type: number
                format: float
                maximum: 2000000000
                minimum: 0.0001
                example: 100
              amount:
                description: >-
                  Offer amount. For account marketplace: minimum 1, maximum 1.
                  For gold marketplace: minimum 1, maximum 2000000000
                type: number
                format: float
                maximum: 2000000000
                minimum: 1
                example: 1
              min_purchase_amount:
                description: >-
                  Minimum purchase amount. Must be >= product step_size. For
                  account marketplace: minimum 1, maximum 1
                type: number
                format: float
                maximum: 2000000000
                minimum: 1
                example: 1
              data:
                description: >-
                  Offer data object. Structure depends on product currency
                  setting fields. Contains field values selected by the seller.
                  All required fields must be provided and validated.
                       *
                       **To get the structure of this object:**
                       *
                       * 1. Get product details: GET /shop/marketplace/products/{productId}
                       * 2. Check the product_fields array in the response
                       * 3. Each field has:
                       * - id - field ID (use as key in data object)
                       * - title - field name
                       * - is_required - whether field is required
                       * - component_edit - field type (1=text, 2=select, etc.)
                       * - field_values - available values for select fields
                       *
                       **Example data structure:**
                       * - Key: field ID (from product_fields)
                       * - Value: for select fields use value string from field_values (e.g. Grandmaster, not the ID), for text fields use actual text value
                       *
                       **Note:** Get the product details first to see which fields are required and what values are available.
                type: object
                example:
                  '81': Battle Royale
                  '82': 123
              marketplace_type:
                description: |-
                  Marketplace type. Must match the product type.
                       *
                       **Possible values:**
                       * - **1** (Gold): Gold marketplace
                       * - **2** (Account): Account marketplace
                type: integer
                enum:
                  - 1
                  - 2
                example: 2
              screenshots:
                description: >-
                  Array of screenshot URLs. Screenshots must be uploaded first
                  using POST /shop/marketplace/offers/upload_screenshot
                  (multipart/form-data). The returned URLs should be included in
                  this array.
                type: array
                items:
                  type: string
                  example: >-
                    storage/uploads/product_currency_offer/screenshot/example.jpg
                nullable: true
              comment_for_reviewer:
                description: Comment for reviewer
                type: string
                example: comment
                nullable: true
              is_auto_activate_status:
                description: Automatically activate status after review passes
                type: boolean
                example: true
                nullable: true
              outer_name:
                description: Outer name (for account marketplace only)
                type: string
                maxLength: 255
                example: test offer
                nullable: true
              internal_name:
                description: Internal name (for account marketplace only)
                type: string
                maxLength: 255
                example: ''
                nullable: true
              description:
                description: Offer description (for account marketplace only)
                type: string
                maxLength: 650
                example: description
                nullable: true
              credential_system_type_id:
                description: >-
                  Authoritative delivery-mode field. 1 = No Credentials
                  (stock-mode), 2 = Single (deprecated — coerced to MULTIPLE on
                  write), 3 = Multiple (credential-mode). Defaults to 3 on
                  create.
                type: integer
                enum:
                  - 1
                  - 2
                  - 3
                example: 1
                nullable: true
              booster_price:
                description: >-
                  Booster price (for fake sellers in account marketplace only).
                  Must be less than price_per_step
                type: number
                format: float
                maximum: 2000000000
                minimum: 0.01
                example: 80
                nullable: true
              credentials:
                description: >-
                  Array of credentials (for account marketplace with credential
                  system). Each credential object contains account login
                  credentials.
                type: array
                items:
                  properties:
                    email:
                      description: Registration email
                      type: string
                      example: 123@test.com
                      nullable: true
                    email_password:
                      description: Email password
                      type: string
                      example: '123456789'
                      nullable: true
                    login:
                      description: Account login
                      type: string
                      example: login
                    game_password:
                      description: Account password
                      type: string
                      example: '987654321'
                    is_2fa_active:
                      description: Whether 2FA is active
                      type: boolean
                      example: true
                      nullable: true
                    comment:
                      description: Comment from seller
                      type: string
                      example: comment
                      nullable: true
                  type: object
                nullable: true
              skycoach_price:
                description: Skycoach price
                type: number
                format: float
                example: null
                nullable: true
              import_status:
                description: Import status
                type: integer
                example: 1
                nullable: true
              search_description:
                description: Search description for offer indexing
                type: string
                example: some text
                nullable: true
            type: object
          maxItems: 100
          minItems: 1
        guarantee_delivery_time:
          description: >-
            Guaranteed delivery time in milliseconds (e.g., 86400000 for 24
            hours)
          type: integer
          minimum: 1
          example: 86400000
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````