During setting up a connection to Microsoft Dynamics 365 Business Central, Shiptheory will connect to the following endpoints for testing:
- OAuth Access Tokens (provided by Microsoft Azure Platform)
- Company Information via ODatav4
- Warehouse / Posted Warehouse Shipment via ODatav4
- Shipment Status Update via ODatav4
These endpoints along with the others listed (e.g. Warehouse Location and User List) in Business Central API Guide are needed by Shiptheory to connect to your Microsoft Dynamics 365 Business Central. Please have these endpoints API properly configured and implemented before setting it the connection in Shiptheory.
Failed to get an OAuth Access Token from Microsoft Dynamics 365
If you receive the above error, please check your input on Tenant ID, Client ID and Client Secret. To learn how to create and find them, please refer to the following:
- Finding the Tenant ID, Client ID & secret and Company ID from Microsoft Dynamics 365 Business Central, and
- Generating new Client ID and secret for Microsoft Dynamics 365 Business Central integration
Company Information via ODatav4
We will make a test connection to check the company name
Format
GET https://api.businesscentral.dynamics.com/v2.0/{{TENANT_ID}}/{{ENVIRONMENT_NAME}}/ODataV4/Company('{{COMPANY_NAME}}')/
Example
https://api.businesscentral.dynamics.com/v2.0/tenant_id/Production/ODataV4/Company('DEMO%20UK')/'
Warehouse / Posted Warehouse Shipment via ODatav4
We will make a test connection to download a testing shipment, an empty list should be returned.
HTTP – GET
For Warehouse Shipment:
https://api.businesscentral.dynamics.com/v2.0/TENANTID/Sandbox/ODataV4/Company('COMPANYID')/shiptheoryWhseShipments?$filter=QUERY_STRING
For Posted Warehouse Shipment:
https://api.businesscentral.dynamics.com/v2.0/TENANTID/Sandbox/ODataV4/Company('COMPANYID')/shiptheoryPostedWhseShipmentsQuery?$filter=QUERY_STRING
Example
https://api.businesscentral.dynamics.com/v2.0/tenant_id/Production/ODataV4/Company('DEMO%20UK')/shiptheoryPostedWhseShipmentsQuery/?$filter=whseShipmentNo eq 'shiptheory_test'
Shipment Status Update via ODatav4
We will make a test connection to update a testing shipment, please refer the Business Central API Guide for proper respone
For Warehouse Shipment - PUT
https://api.businesscentral.dynamics.com/v2.0/TENANTID/Sandbox/ODataV4/Company('COMPANYID')/shiptheoryWarehouseShipmentLine(systemIdWhseShipmentLine)
e.g. …/shiptheoryWarehouseShipmentLine(ddb86f8b-c0ba-ee22-a56a-6045bdd0821d)
Shiptheory will make multiple calls to update each shipment lines status.
For Post Warehouse Shipment - PATCH
https://api.businesscentral.dynamics.com/v2.0/TENANTID/Sandbox/ODataV4/Company('COMPANYID')/shiptheoryPostedWarehouseShipments(no=’whseShipmentNo’)
e.g. …/shiptheoryPostedWarehouseShipments(no='TEST_SHIPMENT_NO')
Payload
{
"shiptheoryStatus": "TEST_STATUS",
}