{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"161a649f-025e-462f-8315-27382756b01c","name":"Client API Integration","description":"## Overview\n\nThere are two environments that you can work with for the Client API Integration: production and sandbox. We recommend that you test the integration on our sandbox environment first, before moving forward with production.\n\n1. **Acces Token**\n    \n\nTo use the API, you will need your access token.\n\nYou can generate these tokens (maximum 5) on our web platform.\n\n- **Production**:\n    \n    - Create Account: [https://ship.uniuni.com/signup](https://ship.uniuni.com/signup)\n        \n    - Generate Token: [https://ship.uniuni.com/integrations/rest-api](https://ship.uniuni.com/integrations/rest-api)\n        \n- **Sandbox**:\n    \n    - Create Account: [https://sandbox.unigo.ca/signup](https://sandbox.unigo.ca/signup)\n        \n    - Generate Token: [https://sandbox.unigo.ca/integrations/rest-api](https://sandbox.unigo.ca/integrations/rest-api)\n        \n\nYou can also find this page by navigating to **New shipment > Import from integration > REST API** on the UNIUNI SHIP website. Treat access tokens with the same level of security as passwords. Deleting an access token will immediately revoke its access.\n\nExample of getting your access token:\n\n- Generate an access token\n    \n\n<img src=\"https://content.pstmn.io/7356ec6a-c110-439a-9471-dc57552fe094/U2NyZWVuc2hvdCAyMDI1LTExLTA2IGF0IDEuMzUuNTjigK9QTS5wbmc=\">\n\n- get and copy the access token\n    \n\n<img src=\"https://content.pstmn.io/d005367a-0099-4825-85b3-a5e28b89c2eb/U2NyZWVuc2hvdCAyMDI1LTExLTA2IGF0IDEuMzcuNTbigK9QTS5wbmc=\">\n\n2\\. **Add Credits** in your account\n\nIf you want to top-up in sandbox environment, you can use the test credit card number: **4242 4242 4242 4242** with any expiry and CVC.\n\nExample of adding credits:\n\n<img src=\"https://content.pstmn.io/1097c75d-f2f7-4918-a95c-da16c8a416b5/U2NyZWVuc2hvdCAyMDI1LTExLTA3IGF0IDEwLjA4LjAy4oCvQU0ucG5n\">\n\n<img src=\"https://content.pstmn.io/7305a59e-ad54-4e9f-9804-ce701f2be8de/U2NyZWVuc2hvdCAyMDI1LTExLTA3IGF0IDEwLjA5LjI54oCvQU0ucG5n\">\n\n<img src=\"https://content.pstmn.io/931cbbe0-425a-45aa-8d72-e265b6e15e69/U2NyZWVuc2hvdCAyMDI1LTExLTA3IGF0IDEwLjEwLjI34oCvQU0ucG5n\">\n\n## Making a Request\n\n### API Environments\n\nWe provide both **testing** and **production** environments. The API base URLs for different environments are as follows. Please ensure you use the correct URL depending on your purpose:\n\n- **Sandbox**: `https://api-sandbox.ship.uniuni.com/client/`\n    \n- **Production**: `https://api.ship.uniuni.com/prod/client/`\n    \n\nAll requests are HTTPS only.\n\n### Authentication\n\nEach request must include your **API access token** in the `Authorization` header:\n\n``` typescript\nAuthorization: Bearer <YOUR_ACCESS_TOKEN>\n\n ```\n\n### Request & Response Format\n\n- All requests and responses use **JSON**.\n    \n- Use `Content-Type: application/json; charset=utf-8` for POST bodies.\n    \n- All object keys are in **camelCase**.\n    \n- Invalid Payload will result in HTTP Code 422\n    \n- Response HTTP Code is always 200 with a valid payload.\n    \n- All responses adhere to the following structure. You can get data from the `data` parameter.\n    \n\n``` json\n{\n    \"message\": \"Shipment created successfully\",\n    \"code\": 0,\n    \"data\":{\n       ...\n    }\n}\n\n ```\n\n- `message`: A string providing additional information about the request status (may be empty).\n    \n- `code`: An integer representing the status code of the request (0 typically indicates success).\n    \n- `data`: This is the main response parameter. It will return null if the code is not 0.\n    \n\n**Pagination**\n\nCollection APIs support pagination via:\n\n- `pageSize` (default: 10, max: 500)\n    \n- `page` (default: 1)\n    \n\n## Testing in Sandbox\n\nYou can test your integration freely using the sandbox URL:\n\n``` typescript\nhttps://api-sandbox.ship.uniuni.com/client/\n\n ```\n\nNo charges will be incurred. Sandbox data is isolated and can be reset without affecting production.\n\n## Notes\n\n- The documentation may be updated based on the definition of the API.\n    \n- Once you’ve purchased the shipment and printed the label, please visit [https://ship.uniuni.com/locations](https://ship.uniuni.com/locations) to confirm your drop-off location or [https://ship.uniuni.com/pickups](https://ship.uniuni.com/pickups) to request a pick-up service (if available).\n    \n\n## Troubleshooting\n\nLearn how to diagnose and resolve common problems for the REST API.\n\n## 422 Unprocessable Content\n\nIf you omit required parameters or you use the wrong type for a parameter, you may receive a `422 Unprocessable Entity` response and an \"Invalid payload\" error message. For example, you will get this error if you specify a parameter value as a string but the endpoint is expecting a number. You can refer to the reference documentation for the endpoint to verify that you are using the correct parameter types and that you are including all of the required parameters.\n\n``` json\n{\n    \"message\": \"Invalid payload [\\n  {\\n    \\\"code\\\": \\\"invalid_type\\\",\\n    \\\"expected\\\": \\\"number\\\",\\n    \\\"received\\\": \\\"nan\\\",\\n    \\\"path\\\": [\\n      \\\"page\\\"\\n    ],\\n    \\\"message\\\": \\\"Expected number, received nan\\\"\\n  }\\n]\",\n    \"errorCode\": \"PayloadValidationError\",\n    \"statusCode\": 422,\n    \"meta\": {\n        \"issues\": [\n            {\n                \"code\": \"invalid_type\",\n                \"expected\": \"number\",\n                \"received\": \"nan\",\n                \"path\": [\n                    \"page\"\n                ],\n                \"message\": \"Expected number, received nan\"\n            }\n        ],\n        \"name\": \"ZodError\"\n    }\n}\n\n ```\n\n## Authentication Failed\n\n``` json\n{\n    \"message\": \"Invalid or revoked access token\",\n    \"code\": 1009,\n    \"data\": null\n}\n\n ```\n\n``` json\n{\n    \"message\": \"Missing access token\",\n    \"code\": 1009,\n    \"data\": null\n}\n\n ```\n\n## Error Code handling\n\n| **code** | **Reason** |\n| --- | --- |\n| 1002 | Invalid request |\n| 1006 | DB error |\n| 1009 | General error |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"41661497","team":6767801,"collectionId":"161a649f-025e-462f-8315-27382756b01c","publishedId":"2sB2cUAhiP","public":true,"publicUrl":"https://docs.ship.uniuni.com","privateUrl":"https://go.postman.co/documentation/41661497-161a649f-025e-462f-8315-27382756b01c","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/b83fef25-5986-428b-8f59-2f4397b9a043/bG9nb19kYXJrLnBuZw==","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":"https://content.pstmn.io/0214521a-db4d-49bf-9ad2-ea3bb816ea5b/bG9nby5wbmc=","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.11.6","publishDate":"2025-08-06T23:50:52.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":"https://content.pstmn.io/0214521a-db4d-49bf-9ad2-ea3bb816ea5b/bG9nby5wbmc=","logoDark":"https://content.pstmn.io/b83fef25-5986-428b-8f59-2f4397b9a043/bG9nb19kYXJrLnBuZw=="}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/f5caca9f78017a790bdbae59834e4d562b0fed8bc2b307cedac95b21edd2c6f8","favicon":"https://uniuni.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://docs.ship.uniuni.com/view/metadata/2sB2cUAhiP"}