> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-update-ref-tables.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v0/wallet/buy-traffic-requests/:tracking_id/status

> Check the status of a buy traffic request with a given tracking id.




## OpenAPI

````yaml /openapi/splice/validator/wallet-external.yaml post /v0/wallet/buy-traffic-requests/{tracking_id}/status
openapi: 3.0.0
info:
  title: Wallet API
  version: 0.0.1
servers:
  - url: https://example.com/api/validator
security: []
tags:
  - name: wallet
paths:
  /v0/wallet/buy-traffic-requests/{tracking_id}/status:
    post:
      tags:
        - wallet
      summary: POST /v0/wallet/buy-traffic-requests/:tracking_id/status
      description: |
        Check the status of a buy traffic request with a given tracking id.
      operationId: getBuyTrafficRequestStatus
      parameters:
        - in: path
          name: tracking_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            A request to buy traffic with this tracking id has been submitted
            before, check the response for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBuyTrafficRequestStatusResponse'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: No request with this tracking id was found.
      security:
        - walletUserAuth: []
components:
  schemas:
    GetBuyTrafficRequestStatusResponse:
      oneOf:
        - $ref: '#/components/schemas/BuyTrafficRequestCreatedResponse'
        - $ref: '#/components/schemas/BuyTrafficRequestCompletedResponse'
        - $ref: '#/components/schemas/BuyTrafficRequestFailedResponse'
      discriminator:
        propertyName: status
        mapping:
          created:
            $ref: '#/components/schemas/BuyTrafficRequestCreatedResponse'
          completed:
            $ref: '#/components/schemas/BuyTrafficRequestCompletedResponse'
          failed:
            $ref: '#/components/schemas/BuyTrafficRequestFailedResponse'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    BuyTrafficRequestCreatedResponse:
      allOf:
        - $ref: '#/components/schemas/BaseGetBuyTrafficRequestStatusResponse'
    BuyTrafficRequestCompletedResponse:
      allOf:
        - $ref: '#/components/schemas/BaseGetBuyTrafficRequestStatusResponse'
        - type: object
          required:
            - transaction_id
          properties:
            transaction_id:
              type: string
              description: |
                Id of the transaction that purchased traffic.
    BuyTrafficRequestFailedResponse:
      allOf:
        - $ref: '#/components/schemas/BaseGetBuyTrafficRequestStatusResponse'
        - type: object
          required:
            - failure_reason
          properties:
            failure_reason:
              type: string
              description: |
                The reason for the failure of the request to buy traffic.
                expired:
                  The wallet automation did not process the request in time.
                rejected:
                  The wallet automation rejected the request, e.g., due to insufficient funds or operational reasons.
              enum:
                - expired
                - rejected
            rejection_reason:
              description: |
                Human readable description of the rejection reason.
              type: string
    BaseGetBuyTrafficRequestStatusResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: |
            The status of the traffic request
            created:
              The request to buy traffic has been created and is waiting for
              the wallet automation to pick it up.
            completed:
              The traffic has been purchased.
              transaction_id points to the transaction that purchased traffic.
            failed:
              The request to buy traffic has failed permanently and no CC has been transferred. Refer to
              failure_reason for details. Use a new tracking_id if you want to retry buying traffic.
  securitySchemes:
    walletUserAuth:
      description: >
        JWT token as described in
        [spliceAppBearerAuth]("../../../../common/src/main/openapi/common-external.yaml#/components/securitySchemes/spliceAppBearerAuth").

        The subject of the token must be ledger API user of the user whose
        wallet the endpoint affects.
      type: http
      scheme: bearer
      bearerFormat: JWT

````