{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"6f97298e-60aa-4f15-8816-9bbead765d83","name":"NewMile Partner API v1","description":"Partner API for customer order intake and read integrations.\n\n**Authentication.** Set the `api_token` collection variable to your org's API token; every request sends it as `x-api-auth-token`. Tokens are created on the organization settings **API** page. A **read-only** token can `GET` everything its org may see but receives `403 {\"error\":\"This API token is read-only\"}` on `POST` / `PUT` / `PATCH` / `DELETE` (see the saved example on *Create Order Examples → 1. Minimal*).\n\n**Base URL.** `https://api.newmile.com` (the `base_url` collection variable).\n\n**Who sees what.** Every read payload is sliced for the org that owns the token, using the same party rules as the web app. Keys your org may not see are **omitted** — a missing key means \"not visible to you\", a `null` means \"not set\".\n\n| Field(s) | Visible to |\n|---|---|\n| `current_rate.freight_rate`, `freight_rate_uom`, `additional_fees` (PO and order) | customer, hauler |\n| `current_rate.material_rate`, `material_rate_uom` | customer, material purchaser |\n| `current_rate.material_cost`, `material_cost_uom` | material purchaser only |\n| `current_rate.delivered_rate` | anyone who sees at least one rate above |\n| order `truck_pay_rate`, `truck_pay_rate_uom` | the order's hauler and its parents |\n| `material_vendor` / `vendor_location` | hauler, purchaser, vendor — a customer-only org sees the broker and a masked location |\n| `pick_up_location` / `drop_off_location` `address`, `lat`, `lng`, `notes` | the party allowed to see that site; hidden sites keep `id` + a broker label with `masked: true` |\n| `project.name`, `project.reference_number` | everyone but a material-vendor-only org, which gets `\"<broker> Project <id>\"` and no reference number |\n\nThe saved examples on **Get Purchase Order** and **Get Order** show the same record as seen by the customer, the hauler, and the material purchaser. Full reference: `docs/partner_api_order_guide.md` in the newmile-web repo.\n\n**Ticket images (Record Load).** `POST /orders/:order_number/loads` and `POST /purchase_orders/:purchase_order_number/loads` accept a photo of the scale ticket in the `ticket_image` field. NewMile reads the truck, ticket number, quantity, unit and date from the photo, then records the load with the same rules as a manual submission. There are **two ways to send the image**. Both go through the same OCR and give the same result; pick the one that fits your client.\n\n| | JSON data URI | Multipart file |\n|---|---|---|\n| `Content-Type` | `application/json` | `multipart/form-data` (let the client set the boundary) |\n| `ticket_image` | a string: `data:image/jpeg;base64,<base64 bytes>` | a file part |\n| Other fields | JSON keys in the same object | text parts in the same form |\n| Good for | server-to-server integrations that already hold the bytes | curl, scripts, Postman, anything with a file on disk |\n| Examples here | *Record Load Examples → 1* and *3* (set the `ticket_image_data_uri` variable first) | *Record Load Examples → 7* |\n\nTo build the data URI from a file: macOS `echo \"data:image/jpeg;base64,$(base64 -i ticket.jpg)\"`, Linux `echo \"data:image/jpeg;base64,$(base64 -w0 ticket.jpg)\"`. Paste the output into the `ticket_image_data_uri` collection variable and the JSON image examples run as-is. Use `image/png` or `image/gif` for those formats. A bare base64 string without the `data:` prefix is rejected.\n\nLimits for both: JPEG, PNG or GIF; 1 byte – 5 MB decoded (a JSON body may be up to ~6.7 MB before decoding); exactly one ticket per image. A clean, complete read returns **201** with the load. Anything uncertain — a field OCR could not read, low confidence, several tickets in one photo, a unit that does not match the job — returns **202 needs_review** with a `parse_job_id`; the photo is kept in the Field Tickets review queue and no load or assignment is created until a reviewer confirms it. Full reference: `docs/partner_api_load_guide.md`.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"40575718","team":6616164,"collectionId":"6f97298e-60aa-4f15-8816-9bbead765d83","publishedId":"2sBXijKCK4","public":true,"publicUrl":"https://developer.newmile.com","privateUrl":"https://go.postman.co/documentation/40575718-6f97298e-60aa-4f15-8816-9bbead765d83","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"system_default","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.8","publishDate":"2026-03-23T14:30:39.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"NewMile","id":"891406f3-c914-4524-971e-37f0e618d40e","owner":"40575718","values":[{"key":"base_url","value":"","enabled":true,"type":"default"}],"published":true}],"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/b0034234690fcb24bf7665b2b09204cb2b4a0ba240d4673c5f5e07af1ee9a007","favicon":"https://res.cloudinary.com/postman/image/upload/v1734722697/team/87f1a128d6a83858607d386b0803b72a.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"},{"label":"NewMile","value":"40575718-891406f3-c914-4524-971e-37f0e618d40e"}],"canonicalUrl":"https://developer.newmile.com/view/metadata/2sBXijKCK4"}