πŸ“–Get Order Tracking

Get Order Tracking

POST https://app.pgprints.io/api/v1/orders/trackings

Headers

NameTypeDescription

Content-Type*

string

application/json

X-PGPrints-Hmac-Sha256*

string

X-PGPrints-Store-Id*

string

use the Store ID taken from the Manage Keys

Request Body

NameTypeDescription

fromTime

Number

The millisecond number must not exceed 30 days

toTime

Number

The millisecond number must not exceed 30 days

/{
    "success": true,
    "message": "OK",
    "data": [
        {
            "sku": "TT95-One_size",
            "storeId": "64c8dbd6a44d3e9da0d5a133",
            "pgcOrderId": "PG1638-2628",
            "trackingNumber": "11111",
            "carrierCode": "usp",
            "trackingedAt": "2024-04-01T10:50:20.009Z"
        }
    ]
}
// example body
{
  "fromTime": 1709611319000,
  "toTime": 1712030519000
}

This is my code some language:

//example nodejs with axios
var axios = require('axios');
var data = JSON.stringify({...body});

var config = {
  method: 'post',
  url: 'https://app.pgprints.io/app/v1/orders/trackings',
  headers: { 
    'Content-Type': 'application/json', 
    'X-PGPrints-Store-Id': 'storeid', 
    'X-PGPrints-Hmac-Sha256': 'sha256'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Last updated