{"info":{"_postman_id":"93c4b5a0-a5ed-45eb-972e-2664e089c1ac","name":"Mansfield Energy - API Documentation","description":"<html><head></head><body><p>Please contact <a href=\"https://mailto:ITDevOps@mansfieldoil.com\">ITDevOps@mansfieldoil.com</a> for information on API access and capabilities.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"19592888","collectionId":"93c4b5a0-a5ed-45eb-972e-2664e089c1ac","publishedId":"2s8ZDVZNeZ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"2A75D4"},"publishDate":"2023-01-17T20:42:19.000Z"},"item":[{"name":"Authentication","item":[{"name":"Access Token","id":"a93c8523-38f4-4925-8b59-82c9cac4736e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"client_credentials","type":"text"},{"key":"client_id","value":"{{clientID}}","type":"text"},{"key":"client_secret","value":"{{clientSecret}}","type":"text"},{"key":"scope","value":"https://{{tenant}}.onmicrosoft.com/clientgateway/.default","type":"text"}]},"url":"https://{{tenant}}.b2clogin.com/{{tenant}}.onmicrosoft.com/b2c_1_signin/oauth2/v2.0/token","description":"<p>Set the variables for <code>tenant</code>, <code>clientID</code>, and <code>clientSecret</code>to execute the request.</p>\n","urlObject":{"protocol":"https","path":["{{tenant}}.onmicrosoft.com","b2c_1_signin","oauth2","v2.0","token"],"host":["{{tenant}}","b2clogin","com"],"query":[],"variable":[]}},"response":[{"id":"5c8d5bdc-457e-430d-bddb-eccd0e5a2a48","name":"Success","originalRequest":{"method":"GET","header":[],"url":"https://{{tenant}}.b2clogin.com/{{tenant}}.onmicrosoft.com/b2c_1_signin/oauth2/v2.0/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"access_token\": \"eyJ0eX...\",\n  \"token_type\": \"Bearer\",\n  \"not_before\": 1664974488,\n  \"expires_in\": 3600,\n  \"expires_on\": 1664978088,\n  \"resource\": \"9fbd3ab8-ff10-4a18-8b58-375d41b9efb5\"\n}"},{"id":"8e15a9a9-1757-4909-896b-83b9ef86458b","name":"Bad Request","originalRequest":{"method":"GET","header":[],"url":"https://{{tenant}}.b2clogin.com/{{tenant}}.onmicrosoft.com/b2c_1_signin/oauth2/v2.0/token"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"error\": \"invalid_request\",\n  \"error_description\": \"AADB2C90079: Clients must send a client_secret when redeeming a confidential grant.\\r\\nCorrelation ID: 1bac...\\r\\nTimestamp: 2022-10-05 14:10:45Z\\r\\n\"\n}"},{"id":"bc81bf13-d0bc-49bb-b652-5b12e0d8a66b","name":"Unexpected Error","originalRequest":{"method":"GET","header":[],"url":"https://{{tenant}}.b2clogin.com/{{tenant}}.onmicrosoft.com/b2c_1_signin/oauth2/v2.0/token"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""},{"id":"e6a2dd77-8280-47c4-8645-2d95f1a58550","name":"Resource Not Found","originalRequest":{"method":"GET","header":[],"url":"https://{{tenant}}.b2clogin.com/{{tenant}}.onmicrosoft.com/b2c_1_signin/oauth2/v2.0/token"},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"a93c8523-38f4-4925-8b59-82c9cac4736e"}],"id":"17296323-7e87-4680-860d-730a16c4b627","description":"<h3 id=\"authentication\">Authentication</h3>\n<p>The API supports <strong>OAuth 2.0</strong>, a token-based authentication method that allows users to authorize third-party applications to access their data without sharing their credentials.</p>\n<p>To authenticate using OAuth 2.0 with the client credentials flow, follow these steps:</p>\n<ol>\n<li><p>Obtain an approved ClientID + ClientSecret from Mansfield</p>\n</li>\n<li><p>Retrieve an access token by making a request to the token endpoint using your client credentials</p>\n</li>\n<li><p>Include the access token in the Authorization header of your requests</p>\n</li>\n</ol>\n","_postman_id":"17296323-7e87-4680-860d-730a16c4b627"},{"name":"Integrations","item":[{"name":"GetDeliveredBioPercentage","id":"47eda323-49cc-4b1a-a764-723e03cd4f3c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{AccessToken}}"}]},"isInherited":false},"method":"GET","header":[{"key":"content-type","value":"application/json","type":"text"}],"url":"https://{{BaseUrl}}/integration/v1/GetDeliveredBioPercentage?date=2024-08-03","description":"<p>Set the variable for <code>BaseUrl</code> and add the <code>AccessToken</code> to the Header to execute the request</p>\n","urlObject":{"protocol":"https","path":["integration","v1","GetDeliveredBioPercentage"],"host":["{{BaseUrl}}"],"query":[{"key":"date","value":"2024-08-03"}],"variable":[]}},"response":[{"id":"f7c6221f-c53b-4d39-aaaf-d2195bf2cb3e","name":"Success","originalRequest":{"method":"GET","header":[{"key":"content-type","value":"application/json","type":"text"}],"url":{"raw":"https://{{BaseUrl}}/integration/v1/GetDeliveredBioPercentage?date=2024-08-03","protocol":"https","host":["{{BaseUrl}}"],"path":["integration","v1","GetDeliveredBioPercentage"],"query":[{"key":"date","value":"2024-08-03"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 22 Jan 2025 13:34:43 GMT"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"postedDate\": \"2024-08-02T00:00:00\",\n        \"deliveryDate\": \"2024-08-02T00:00:00\",\n        \"deliveryYearMonth\": \"2024-08\",\n        \"originalCreditRebill\": \"O\",\n        \"orderID\": 1234567,\n        \"orderDeliveryID\": 1234567,\n        \"deliveryTicketNo\": \"1111111\",\n        \"reportGroup\": \"GROUP X\",\n        \"customerName\": \"Customer B\",\n        \"customerID\": 9999,\n        \"shipToID\": 99999,\n        \"shipToName\": \"ShipTo 1\",\n        \"shipToAddressLine1\": \"1 Main St\",\n        \"shipToAddressLine2\": \"\",\n        \"shiptoCity\": \"Flowery Branch\",\n        \"shiptoState\": \"GA\",\n        \"shiptoZipcode\": \"30542\",\n        \"shipToCounty\": \"Hall\",\n        \"shipToCountry\": \"USA\",\n        \"billedGallons\": 545,\n        \"renewableGallons\": null,\n        \"bioGallons\": null,\n        \"convGallons\": 545\n    },\n    {\n        \"postedDate\": \"2024-08-02T00:00:00\",\n        \"deliveryDate\": \"2024-08-02T00:00:00\",\n        \"deliveryYearMonth\": \"2024-08\",\n        \"originalCreditRebill\": \"O\",\n        \"orderID\": 1234568,\n        \"orderDeliveryID\": 1234568,\n        \"deliveryTicketNo\": \"1111112\",\n        \"reportGroup\": \"GROUP X\",\n        \"customerName\": \"Customer A\",\n        \"customerID\": 9998,\n        \"shipToID\": 99998,\n        \"shipToName\": \"ShipTo 2\",\n        \"shipToAddressLine1\": \"2 Main St\",\n        \"shipToAddressLine2\": \"Attn Customer\",\n        \"shiptoCity\": \"Gainesville\",\n        \"shiptoState\": \"GA\",\n        \"shiptoZipcode\": \"30501\",\n        \"shipToCounty\": \"Hall\",\n        \"shipToCountry\": \"USA\",\n        \"billedGallons\": 426,\n        \"renewableGallons\": null,\n        \"bioGallons\": null,\n        \"convGallons\": 426\n    }\n]"},{"id":"f4e023a7-066f-4aee-94bd-e35ee7ac636c","name":"Unauthorized","originalRequest":{"method":"GET","header":[{"key":"content-type","value":"application/json","type":"text"}],"url":{"raw":"https://{{BaseUrl}}/integration/v1/GetDeliveredBioPercentage?date=2024-08-03","protocol":"https","host":["{{BaseUrl}}"],"path":["integration","v1","GetDeliveredBioPercentage"],"query":[{"key":"date","value":"2024-08-03"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"plain","header":[{"key":"WWW-Authenticate","value":"Bearer error=\"invalid_token\""},{"key":"Date","value":"Wed, 22 Jan 2025 13:40:25 GMT"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"47eda323-49cc-4b1a-a764-723e03cd4f3c"},{"name":"OrderShipmentEvent","id":"21e58b31-a1a1-449a-bc54-c7abdc8b8ced","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{AccessToken}}"}]},"isInherited":false},"method":"POST","header":[{"key":"content-type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n}","options":{"raw":{"language":"json"}}},"url":"https://{{BaseUrl}}/integration/v1/OrderShipmentEvent","urlObject":{"protocol":"https","path":["integration","v1","OrderShipmentEvent"],"host":["{{BaseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"1b64512b-ae38-43f8-ac41-a35d8c1bb5ac","name":"Success","originalRequest":{"method":"POST","header":[{"key":"content-type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n}","options":{"raw":{"language":"json"}}},"url":"{{GatewayUri}}/integration/v1/OrderShipmentEvent"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"X-StackifyID","value":"V2|3fcf7bbc-3cdf-4d3b-ae3c-ccba216187de|C82186|CD21"},{"key":"X-StackifyID","value":"V2|03e3dbaa-af2d-4b7e-b1ff-b020319dd176|C82186|CD26"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"X-Rate-Limit-Limit","value":"1m"},{"key":"X-Rate-Limit-Remaining","value":"299"},{"key":"X-Rate-Limit-Reset","value":"2025-03-04T10:53:37.4909154Z"},{"key":"Date","value":"Tue, 04 Mar 2025 10:52:37 GMT"}],"cookie":[],"responseTime":null,"body":null},{"id":"c5470a1d-25cb-4483-923a-1c52b5282d3b","name":"Unauthorized","originalRequest":{"method":"POST","header":[{"key":"content-type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n}","options":{"raw":{"language":"json"}}},"url":"{{GatewayUri}}/integration/v1/OrderShipmentEvent"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"plain","header":[{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"WWW-Authenticate","value":"Bearer"},{"key":"X-Rate-Limit-Limit","value":"1m"},{"key":"X-Rate-Limit-Remaining","value":"298"},{"key":"X-Rate-Limit-Reset","value":"2025-03-04T10:53:37.4909154Z"},{"key":"Date","value":"Tue, 04 Mar 2025 10:53:03 GMT"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"21e58b31-a1a1-449a-bc54-c7abdc8b8ced"}],"id":"5b50ab93-7e0c-4093-b0b7-b8b1e8217cfa","description":"<h3 id=\"integrations\">Integrations</h3>\n<p>Mansfield will work with customers and partners to provide API integrations to access approved data.</p>\n","_postman_id":"5b50ab93-7e0c-4093-b0b7-b8b1e8217cfa"}],"event":[{"listen":"prerequest","script":{"id":"3f95bb13-b225-4e44-8243-c1a4855d31f9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"45de4e67-bfe4-43d3-b72c-c0f9cba544ed","type":"text/javascript","exec":[""]}}],"variable":[{"key":"clientID","value":"{{clientID}}","type":"string"},{"key":"clientSecret","value":"{{clientSecret}}","type":"string"},{"key":"tenantName","value":"{{tenant}}","type":"string"},{"key":"BaseUrl","value":"{{BaseUrl}}","type":"string"},{"key":"AccessToken","value":"{{AccessToken}}","type":"string"}]}