{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"66bbc188-f8e6-4357-ad4c-13f58586616e","name":"Senpex API v4 Documentation","description":"# API Overview\n\nWelcome to the Senpex API documentation. You can use the Senpex API to provide same-day delivery to your customers by one click.\n\nThrough the Senpex API, your application will be able to create and manage orders as well as retrieve the details and status updates on those select orders. The Senpex API is organized around REST and has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.\n\n## v4.1\n\neSignature request now available in  `/create_quick_order`\n\n## v4\n\nNow users have to send local time for orders instead of UTC. For that purpose parameter in `/get_price` request \"schedule_date\" was changed to \"schedule_date_local\"\n\n## v3\n\nPerformance improvements.\n\n## v2.2\n\nThe update is related to a huge improvement of multi-vendor/warehouse support and a new pricing model for long-distance multi-stop deliveries.\n\nSince now a new request `/create_dropp_off_route` is available. It lets us to group orders by time windows and optimize routes even more efficient as we did.\n\nA new pricing model for long-distance deliveries applicable for intercity and interstate multi-drop-off deliveries where first drop-off point is far than 20 miles from the pick-up.\n\n[more about request <code>/create_dropp_off_route</code>](https://documenter.getpostman.com/view/9662282/TW73Fkyi#b3dc1fd1-2ff4-476c-aba3-d3595bded790)\n\n## v2.1\n\nIncludes multi-vendor/warehouse support. Designed for web portals that aggregate many different pick-up points.\n\n## v2\n\nIncludes the Webhook. Through the Webhook an external application will receive order status changes notifications.\n\nAlso includes powerful add-on that opens new possibilities. Using this add-on external applications are able to load to Senpex Platform a number of addresses which should be served lately. Classical Senpex API works by model \"one delivery - one order\", but add-on works as \"multiple deliveries in one order\". A number of requests and separate Webhook which are used for uninterrupted data exchange make delivery process transparent and convenient.\n\n# Preliminary Notes\n\nTo use the Senpex API, the Client has to register on web.senpex.com. After successful registration, the client has to request for approval from the Senpex support team by making a call 650-514-6350 Once a client gets approved, he will receive an email with the link to API dashboard.\n\n# Requirements\n\nThe API requires credit card details which must be entered at API Dashboard. Notice, it is by default that Senpex will immediately provide the end user a price that will be expected to be paid for, however, the pricing is not determined by Senpex, rather the vendor is given the freedom to choose their own pricing structure. Thereby, the customer will use client secret keys that will be provided by Senpex, but the end user will have the ability to re-generate the secret keys for safety\n\n# What to start with?\n\nIf you are ready to integrate with our API, please send an email to [contact@senpex.com](https://mailto:contact@senpex.com) and include your Client Account - if you don't have one, you can register here [https://web.senpex.com](https://web.senpex.com) Once we receive your email, a member of our API Support Team will contact you to get started.\n\nOnce your account is approved, you will be provided with a ​client_id ​and secret_id. Additionally, you will need to add your own Google Maps API Key to the dashboard.\n\n- Test Environment API Dashboard - [https://api.dashboard.senpex.com/api_login/](https://api.dashboard.senpex.com/api_login/)\n    \n- Production Environment API Dashboard - [https://adminpanel.senpex.com/api_login](https://adminpanel.senpex.com/api_login)\n    \n\nTo create your own Google Maps API Key, visit: [https://developers.google.com](https://developers.google.com) Create a new account or register with an existing one. After you’re logged in, go to the Products/Cloud and click “Go to console”. Then go to “APIs & Services”/Dashboard/Credentials and click “Create Credentials”/API key. After you created your API key you need to activate the Geocoding API, Directions API, Distance matrix API, Geolocation API, Places API, Time Zone API.\n\nOnce you get a Google API key, verify it [here](https://yougapi.com/tools/google-api-key-checker.php). After verification, paste it in Senpex API Dashboard.\n\nNote! Please, keep these keys secured and do not embed them in any client-side code.\n\n# Environments\n\nEvery integration starts with the Test Environment. Credentials and all required information for both environments will be provided by Senpex Support Team.\n\n- Baselink for Test Environment `https://api.sandbox.senpex.com/senpex/api/rest/v4`\n    \n- Baselink for Production `https://api.production.senpex.com/senpex/api/rest/v4`\n    \n\n\\-\n\n- Images Test server: `https://imagesfiles.version4.senpex.com/image_list/`\n    \n- Images Prod server `https://imagesfiles.production.senpex.com/image_list/`\n    \n\n# Dictionary Definitions\n\n### Available Transport Types\n\nSenpex platform provides five different types of transportation vehicle for delivering orders depending on the size of the order. As a default transport type, set up 'Car'\n\n| ID | Transport Type | Definition |\n| --- | --- | --- |\n| 1 | Car | Set type as Car, if the estimated total weight of the order is Small, Medium and Large that can be accommodated easily. |\n| 3 | SUV | Set type as SUV, for Large loads with big value. |\n| 8 | Pickup Truck | Set type as Pickup Truck, for Heavy and Big Size loads. |\n| 9 | Large Van | Set type as Large Van, for Heavy and Big Size loads. |\n\n### Package Size Types\n\n| ID | Size | Definition |\n| --- | --- | --- |\n| 1 | Small (1-25 lbs) | Boxes 15 in., envelopes, food, flowers and other items be- tween 0 - 25 Lbs |\n| 2 | Medium (26 – 50 lbs) | Boxes 30 in., small appliance, tools, meals, and other items between 25 - 50 Lbs |\n| 3 | Large (51 – 70 lbs) | Boxes 45 in., appliance, supplies and other items between 50 - 70 Lbs (Not requires lifting equipment) |\n| 4 | Heavy Load (71 - 150 Lbs) | Major appliance, carpets, mattresses, equipment, furniture and other items between 70 - 150 Lbs |\n| 5 | Not Heavy but Big Size (up to 70 Lbs) | Big and lightweight items: Containers, tanks, Home Cinema, Octobass, polystyrene and other items up to 70 Lbs |\n\nAs a default package size set up 'Small'\n\n### Order Status\n\nAPI provides different statuses for the Order that is placed.\n\n| ID | Status | Definition |\n| --- | --- | --- |\n| 0 | Draft Order | Order has not been placed yet, but is saved as a draft . |\n| 5 | Waiting for pay | Order is placed and is awaiting payment. |\n| 7 | Scheduled order | Order is scheduled for a future date and time. |\n| 8 | Repeated order | Root order for scheduled orders. |\n| 10 | Paid order | Order payment is done |\n| 20 | Courier selected | Courier service is selected for the order |\n| 22 | Started working | Courier is en-route |\n| 25 | Arrived to pickup location | Courier arrived to pickup location |\n| 30 | Item in transit | Package is in transit for delivery |\n| 35 | Arrived to drop-off location | Driver arrived |\n| 40 | Item is delivered | Package is delivered |\n| 50 | Item not given | Package is not delivered |\n| 90 | Reported order | Order is reported for some incident |\n| 100 | Cancelled order | Order is cancelled by customer |\n\n### Route Status\n\nRoute status for any order will be “0” if the order is not yet taken by the courier.\n\n| ID | Status | Definition |\n| --- | --- | --- |\n| 0 | Order not taken | Order not taken by the courier |\n| 30 | Order is taken | Order is taken by the courier |\n| 40 | Order is delivered | Order is delivered |\n\n### Courier Package Cancellation Reasons\n\nA courier can be cancelled anytime. This list shows the available reason for cancellation.\n\n| ID | Reason | Definition |\n| --- | --- | --- |\n| 1 | Personal Problems | Courier cancelled due to personal problems. |\n| 2 | Car Problems | Courier cancelled due to car problems. |\n| 3 | Other issues | Courier cancelled due to other issues. |\n\n# Errors\n\nEach REST API request results is giving error information:\n\n| Code | Error | Meaning |\n| --- | --- | --- |\n| 28 | StripeError | Unable to perform operation. Message: This value must be greater than or equal to 1. |\n| 38 | EmptyValueError | (parameter) cannot be empty, eg: order name cannot be empty |\n| 35 | MileError | Maximum 300 miles accepted |\n| 50 | DataVarNotFound | Receiver phone number cannot be found |\n| 58 | NoCreditCard | You don’t have linked credit card |\n| 59 | SecretIDNotFound | Secret id not found |\n| 60 | ClientIDNotFound | Client id not found |\n| 61 | CompanyIsDisable | This Key is disabled by Snpx administration. Contact us . |\n| 62 | SecretIsWrong | Secret or Client key is wrong |\n| 63 | ApiTokenNotFound | This token cannot be found |\n| 64 | ApiTokenNotYours | This token is not belongs to you |\n| 65 | ApiTokenPriceExpired | This price is expired |\n| 66 | ApiThisOrderAlreadyPaid | This order is already paid |\n| 67 | RouteCountError | Routes count should be between 1 and 5. You provided 0 |\n| 68 | ScheduleDateLow | Schedule date cannot be less than current date |\n| 69 | ApiNotApprovedByAdmin | This API has not been approved by Senpex. Please, contact the Senpex support team. |\n| 70 | ApiNotApprovedByOwner | You should enable you API on your “API Configuration” panel |\n| 71 | APIPaymentDetailsNotFound | Your should assign your credit card to be able to use API |\n| 73 | WrongEmailFormat | Please enter email in correct format |\n| 13 | PackNotFound | You don't have access to this order, or it was canceled. |\n| 5 | NotNumberValueError | order_id should be numeric |\n| 14 | PackIncorrectStatus | You cannot do this operation on this order. Current status Cancelled pack. Acceptable statuses |\n| \\-50 | DataVarNotFound | Receiver name for 1 cannot be found |\n| \\-50 | DataVarNotFound | Receiver phone number for 1 cannot be found |\n| \\-5279 | RoutesNotArray | The list of routes should be provided in array |\n| \\-1081 | NotCorrespondingTransportForSize | Not corresponding transport_id for current pack_size. Allowed transports(1) |\n| \\-1282 | DataNotJson | Request body is not in JSON format |\n| \\-1126 | WrongOrderName | alphabetical and numerical symbols accepted |\n| \\-3250 | OrderNotExists | Order ID is not exist |\n| \\-23123 | PriceNotFound | Price information not found |\n| \\-10000 | GoogleAPICannotFindAddress | Google API cannot find required address |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"9662282","team":1052473,"collectionId":"66bbc188-f8e6-4357-ad4c-13f58586616e","publishedId":"TW73Fkyi","public":true,"publicUrl":"https://documenter-api.postman.tech/view/9662282/TW73Fkyi","privateUrl":"https://go.postman.co/documentation/9662282-66bbc188-f8e6-4357-ad4c-13f58586616e","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2021-06-12T21:06:54.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"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/d17a3523557051509af170e597018241da0046d6e1bf83a97aa67ad38571963f","favicon":""},"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://documenter.gw.postman.com/view/metadata/TW73Fkyi"}