Sync Order

If an order number needs to be in sync with Tandym, then sync order api shall be used.

The sync-order model

The sync-order model contains all the information required to sync the order number with Tandym.

Properties

  • Name
    order_id
    Type
    string
    Description

    The order_id to sync

  • Name
    reference_order_id
    Type
    string
    Description

    Some reference text for the order (optional)


PATCH/custom/order/sync/:transaction_receipt

Sync an order

This endpoint allows you to sync the order number with Tandym.

Required attributes

  • Name
    order_id
    Type
    string
    Description

    The order_id to sync

  • Name
    reference_order_id
    Type
    string
    Description

    Some reference text for the order (optional)

Request

PATCH
/custom/order/sync/:transaction_receipt
curl -X PATCH https://stagingapi.platform.poweredbytandym.com/custom/order/sync/:transaction_receipt \
  -H 'content-type:application/json' \
  -H 'apiKey:{YOURPAY_API_KEY}' \
  -H 'secret:{YOURPAY_API_SECRET}' \
  -d '{
        "order_id":"1001",
        "reference_order_id":"SOME_REFERENCE_TEXT"
      }'

Success Response

{
  "sync": 1
}

Error Response

{
  "sync": 0,
  "errorcode": "SYNC_UNSUCCESSFUL",
  "errormessage": "Sync is not successful!"      
}