# Upload logistics information

> Upload carrier and tracking information for a payment transaction.

```yaml
openapi: 3.1.0
info:
  title: Upload logistics information
  version: 1.0.0
  description: Upload carrier and tracking information for a payment transaction.
paths:
  /v1/txn/uploadLogisticsInfo:
    post:
      summary: Upload logistics information
      description: Upload carrier and tracking information for a payment transaction.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway. See
                    [Setup](/payments/get-started/setup#retrieve-your-credentials)
                    for how to obtain it.
                transactionId:
                  type: string
                  description: Onerway transaction number for the target payment whose logistics
                    information is being uploaded, transmitted as a JSON string.
                  x-onerway-constraints:
                    - kind: rule
                      text: Upload logistics information only for transactions that have completed
                        successfully.
                    - kind: rule
                      text: Submitting the same `transactionId` again automatically replaces the
                        existing logistics information with the information in
                        the new request.
                    - kind: unsupported
                      text: For stc pay settlement, virtual-goods transactions and installment
                        transactions are not supported for this logistics
                        settlement prerequisite.
                carrierNo:
                  type: string
                  description: Carrier code used to identify the logistics provider for shipment
                    tracking.
                  x-onerway-constraints:
                    - kind: values
                      text: Use a carrier code from [Onerway's logistics carrier code
                        list](/downloads/payments/logistics/carrier-codes.csv).
                        The downloadable list covers more than 1,000 carriers
                        globally.
                trackingNo:
                  type: string
                  description: Package tracking number provided by the carrier, used to track
                    shipment progress and delivery status.
                  x-onerway-constraints:
                    - kind: rule
                      text: For stc pay settlement, upload logistics information only after the
                        package has been delivered to and signed for by the
                        customer.
                sign:
                  type: string
                  description: Request signature string. See [Request
                    signing](/payments/get-started/request-signing) for how to
                    generate it.
              required:
                - merchantNo
                - transactionId
                - carrierNo
                - trackingNo
                - sign
            examples:
              upload-logistics-info:
                summary: Upload logistics information
                value:
                  carrierNo: SF
                  merchantNo: replace_with_merchant_no
                  sign: "{{SIGN}}"
                  trackingNo: SF1234567890
                  transactionId: example_transaction_id
      responses:
        "200":
          description: Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      respCode:
                        type: string
                        description: Response code; `20000` means the upload request was processed
                          successfully, other values are error codes. See
                          [Response
                          codes](/payments/api-reference/response-codes).
                      respMsg:
                        type: string
                        description: Human-readable message for the response code.
                      data:
                        type:
                          - string
                          - "null"
                        description: Onerway transaction number corresponding to the successful
                          logistics upload.
                        x-onerway-constraints:
                          - kind: rule
                            text: "`data` is the transaction ID string itself, not a nested object."
                        x-onerway-value:
                          nullable: true
                          when:
                            en: Returns the `transactionId` from the request when the upload succeeds.
                              Returns `null` for the `50018`, `50204`, and
                              `50000` error responses.
                            zh: 上传成功时返回请求中的 `transactionId`；错误响应 `50018`、`50204` 和 `50000` 中返回 `null`。
                  - type: object
                    properties:
                      respCode:
                        type: string
                      respMsg:
                        type: string
                      data:
                        type: "null"
                    required:
                      - respCode
                      - respMsg
                      - data
                  - type: object
                    properties:
                      respCode:
                        type: string
                      respMsg:
                        type: string
                      data:
                        type: "null"
                    required:
                      - respCode
                      - respMsg
                      - data
                  - type: object
                    properties:
                      respCode:
                        type: string
                      respMsg:
                        type: string
                      data:
                        type: "null"
                    required:
                      - respCode
                      - respMsg
                      - data
              examples:
                "50000":
                  summary: A system error occurs while saving the logistics information.
                  description: System error
                  value:
                    respCode: "50000"
                    respMsg: System error
                    data: null
                "50018":
                  summary: The transaction does not exist or does not belong to the merchant
                    identified by `merchantNo`.
                  description: Transaction not found
                  value:
                    respCode: "50018"
                    respMsg: Non-existent order!
                    data: null
                "50204":
                  summary: The transaction has not completed successfully. This includes
                    transactions that are still processing or have failed.
                  description: Invalid transaction status
                  value:
                    respCode: "50204"
                    respMsg: Wrong order status!
                    data: null
```
