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

# Pull the next command

> Claims at most one due command for the server and moves it to `PROCESSING`. Report it with done or fail before pulling again: while a command is processing, pull answers 204. Throttled per server, shared with the official connector.



## OpenAPI

````yaml /api-reference/openapi/seller-v1.yaml post /v1/seller/servers/{serverId}/commands/pull
openapi: 3.1.0
info:
  description: >-
    Read and manage your store's orders, delivery commands, servers and
    webhooks.
  title: Gamecart Seller API
  version: 1.0.0
servers:
  - url: https://api.gamecart.gg
security: []
tags:
  - description: The store behind the API token.
    name: Store
  - description: Orders and the actions on them.
    name: Orders
  - description: Internal notes on orders. Only the seller sees them.
    name: Order notes
  - description: The delivery command queue.
    name: Commands
  - description: >-
      Run the queue from your own executor, with the same protocol as the
      official connectors.
    name: Command execution
  - description: Game servers that receive delivery commands.
    name: Servers
  - description: Webhook endpoints and their deliveries.
    name: Webhooks
paths:
  /v1/seller/servers/{serverId}/commands/pull:
    post:
      tags:
        - Command execution
      summary: Pull the next command
      description: >-
        Claims at most one due command for the server and moves it to
        `PROCESSING`. Report it with done or fail before pulling again: while a
        command is processing, pull answers 204. Throttled per server, shared
        with the official connector.
      parameters:
        - in: path
          name: serverId
          required: true
          schema:
            $ref: '#/components/schemas/UUID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PullCommandRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PulledCommand'
          description: The claimed command.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PlanRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - apiToken:
            - commands:execute
components:
  schemas:
    UUID:
      format: uuid
      pattern: >-
        [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
      type: string
    PullCommandRequest:
      properties:
        onlineIdentifiers:
          description: >-
            Identifiers of the players online right now, such as nicknames. Up
            to 4,096 after trimming and lowercasing. Commands that require the
            player online only run for identifiers in this list.
          examples:
            - - Steve
              - Alex
          items:
            type: string
          type: array
      type: object
    PulledCommand:
      properties:
        command:
          examples:
            - lp user Steve parent add vip
          type: string
        id:
          description: Queued command id. Report it back with done or fail.
          examples:
            - 4512
          format: int64
          type: integer
      type: object
    Problem:
      description: >-
        RFC 9457 problem details. Decide on `status` and `code`; `detail` is
        localized text for people.
      properties:
        code:
          description: Stable machine-readable code.
          examples:
            - ORDER_NOT_FOUND
          type: string
        detail:
          examples:
            - Order not found.
          type: string
        errors:
          description: Field errors of a validation failure.
          items:
            $ref: '#/components/schemas/FieldProblem'
          type: array
        instance:
          examples:
            - /v1/seller/orders/GC-NOPE
          type: string
        requiredScope:
          description: Scopes the operation needs. Present on `INTEGRATION_SCOPE_MISSING`.
          examples:
            - - orders:read
              - orders:buyer:read
          items:
            type: string
          type: array
        retryAfterSeconds:
          description: Seconds to wait. Present on `RATE_LIMIT_ERROR`.
          examples:
            - 17
          type: integer
        status:
          examples:
            - 404
          type: integer
        title:
          examples:
            - Not Found
          type: string
        traceId:
          description: Identifier to quote when contacting support.
          examples:
            - ede70d1d-66d8-4af7-9a4e-a8775b047380
          type: string
        type:
          examples:
            - about:blank
          type: string
      type: object
    FieldProblem:
      properties:
        code:
          description: Message key of the violation.
          examples:
            - validation.required
          type: string
        field:
          examples:
            - content
          type: string
        message:
          examples:
            - This field is required.
          type: string
      type: object
  responses:
    BadRequest:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: >-
        The request is invalid (`VALIDATION_ERROR` lists field errors in
        `errors`).
    Unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The token is missing or invalid (`INVALID_INTEGRATION_TOKEN`).
    PlanRequired:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The store's plan does not include API access (`PLAN_FEATURE_REQUIRED`).
    Forbidden:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: >-
        The token lacks a required scope (`INTEGRATION_SCOPE_MISSING`);
        `requiredScope` lists every scope the operation needs.
    NotFound:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: >-
        The resource does not exist in this store. A resource of another store
        answers the same way.
    Conflict:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The resource is in a state that does not allow the action.
    RateLimited:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The rate limit for this route was reached (`RATE_LIMIT_ERROR`).
      headers:
        Retry-After:
          description: Seconds until the next accepted call.
          schema:
            type: integer
  securitySchemes:
    apiToken:
      description: >-
        API token created in the dashboard under Integrations > API. Tokens
        start with `gci_`.
      scheme: bearer
      type: http

````