Skip to main content

Microsoft Dynamics 365 API Endpoints

Updated this week

Portal/Instance Identifier: https://login.microsoftonline.com

Base URL:

  • Sandbox URL: https://api.businesscentral.dynamics.com

Table of Contents

Customer Endpoints

Get a Customer by Id: (GET)

[Base URL]/api/v2.0/companies({company-id})/customers({customer-id})

Get a Customer by Number: (GET)

[Base URL]/api/v2.0/companies({company-id })/customers?$filter=number eq {customer-number}

Get ODatav4 Customer by Number: (GET)

[Base URL]/ODataV4/Company({company-name})/CustomerCard({customer-no})

Create ODatav4 Customer (POST)

[Base URL]/ODataV4/Company({company-name})/CustomerCard

Create Standard Customer (POST)

[Base URL]/api/v2.0/companies({companyId})/customers

Update a Customer (PATCH)

[Base URL]/ODataV4/Company({company-name})/CustomerCard({customer-no})

Poll Customers by LastModifiedDateTime (GET)

[Base URL]/api/v2.0/companies({companyId})/customers?$top={Limit}&$skip={Page * Limit}&$filter=type eq 'Person' and lastModifiedDateTime ge {utcTimeString}

Customer Categories Endpoints

Get All Customer Categories: (GET)

[Base URL]/api/v2.0/companies({company-name})/CustomerPriceGroups

Poll Customers Categories: (GET)

[Base URL]//ODataV4/Company('{companyName}')/CustomerPriceGroups?$top={Limit}&$skip={Page * Limit}

Company Endpoints

Get a Company by Number (GET)

[Base URL]/api/v2.0/companies/{company-id}/customers?$filter=number eq {customer-number}

Create a Company (POST)

[Base URL]/ODataV4/Company({company-name})/CustomerCard

Get a Company by Id (GET)

[Base URL]/api/v2.0/companies/{company-id}/customers({customer-id})

Update a Company (PATCH)

[Base URL]/ODataV4/Company({company-name})/CustomerCard({customer-no})

Poll Companies by lastModifiedDateTime (GET)

[Base URL]/api/v2.0/companies({companyId})/customers?$top={Limit}&$skip={Page * Limit}&$filter=type eq 'Company' and lastModifiedDateTime ge {utcTimeString}

Contact Endpoints

Get a Contact by Id (GET)

[Base URL]/api/v2.0/companies({company-id})/{contactEndpoint}({contact-id})

Get a Contact by filtering a Contact Number (GET)

[Base URL]/api/v2.0/companies({company-id})/{contactEndpoint}?$filter=number eq {contact-number}

Get a Contact by Contact Number (GET)

[Base URL]/ODataV4/Company({company-name})/{contactEndpoint}({contact-number})

Get a Contact by Company Number and Type Person only (GET)

[Base URL]/ODataV4/Company({company-name})/{contactEndpoint}?$filter=Type eq ‘Person’ and CompanyNo eq {company-number}

Create a Contact (POST)

[Base URL]/api/v2.0/companies({companyId})/customers

Update a Contact (PATCH)

[Base URL]/ODataV4/Company('{companyName}')/CustomerCard({Customer Number})

Poll Contacts by LastModifiedDateTime (GET)

[Base URL]/api/v2.0/companies({companyId})/{contactEndpoint}

$top={Limit}&$skip={Page * Limit}&$filter=lastModifiedDateTime gt {utcTimeString}

Customer Card Endpoints

Get a Company by Number (GET)

[Base URL]/ODataV4/Company({company-name})/CustomerCard({company_no})

Location Endpoints

Get a Location by Id (GET)

[Base URL]/api/v2.0/companies/{company-id}/locations/{location-id}

Get a Location by Code (GET)

[Base URL]/api/v2.0/companies/{company-id}/locations?$filter=code eq {location-code}

Get a Location by Number (GET)

[Base URL]/ODataV4/Company({company-name})/locations({location-no})

Poll Locations (GET)

[Base URL]/ api/v2.0/companies({companyId})/Locations?$top={Limit}&$skip={Page * Limit}&$filter=lastModifiedDateTime gt {utcTimeString}ODataV4/Company({company-name})/locations({location-no})

Sales Invoice Endpoints

Get Sale Invoice by Id (GET)

[Base URL]/api/v2.0/companies ({companyId})/salesInvoices (" + id + ")

Get Sale Invoice by Invoice Number (GET)

[Base URL]/api/v2.0/companies ({companyId})/salesInvoices? $filter=number eq '" + id.ToString () + "'

Get ODatav4 Sale Invoice by Invoice Number (GET)

[Base URL]/ODataV4/Company ('{companyName}')/SalesInvoices?$filter=No eq '{outputInvoice.Number}'

Sales Order Endpoints

Get a Sales Order by Id (GET)

[Base URL]/api/v2.0/companies/{company-id}/salesOrders/{salesorder-id}

Get a Sales Order by Number (GET)

[Base URL]/api/v2.0/companies/{company-id}/salesOrders?$filter=number eq {No}

Get a Sales Order by Number (GET)

[Base URL]/ODataV4/Company({company-name})/SalesOrders?$filter=No eq {salesorder-no}

Create a Sales Order (POST)

[Base URL]/ODataV4/Company({company-name})/SalesOrders

Update ODataV4 Sales Order (PATCH)

[Base URL]/ODataV4/Company({company-name})/SalesOrders('Order',{salesorder-number})

Get Invoice Ids by Order Number (GET)

[Base URL]/ODataV4/Company('{companyName}')/SalesInvoices?$filter=Order_No eq '{OrderNumber}'

Poll Sales Orders (GET)

[Base URL]/ api/v2.0/companies({companyId})/salesOrders?$filter=lastModifiedDateTime ge {utcTimeString}&$top={Limit}&$skip={Page * Limit}

Poll Sales Orders Shipments (GET)

[Base URL]/ api/v2.0/companies({companyId})/salesShipments?$top={Limit}&$skip={Page * Limit}&$filter=lastModifiedDateTime ge {utcTimeString}

Poll Sales Orders Invoices (GET)

[Base URL]/ api/v2.0/companies({companyId})/salesInvoices?$top={Limit}&$skip={Page * Limit}&$filter=lastModifiedDateTime ge {utcTimeString} and orderId ne 00000000-0000-0000-0000-000000000000

Delete Sales Order (DELETE)

[Base URL]/api/v2.0/companies({companyId})/salesOrders({orderId})

Sales Invoice Endpoints

Get Sale Invoice by Id (GET)

[Base URL]/api/v2.0/companies ({companyId})/salesInvoices (" + id + ")

Get Sale Invoice by Invoice Number (GET)

[Base URL]/api/v2.0/companies ({companyId})/salesInvoices? $filter=number eq '" + id.ToString () + "'

Get ODatav4 Sale Invoice by Invoice Number (GET)

[Base URL]/ODataV4/Company ('{companyName}')/SalesInvoices?$filter=No eq '{outputInvoice.Number}'

Sales Invoice Line Item Endpoints

Get Sale Invoice Line Items by Document ID (GET)

[BaseURL]/api/v2.0/companies ({companyId})/salesInvoiceLines?$filter=documentid eq {externalId}

Get ODatav4 Sale Invoice Line by Line Object Number (GET)

[Base URL]/ODataV4/Company('{companyName}')/SalesInvoiceLines?$filter=No eq '{lineItemNumber.LineObjectNumber}

Sales Order Line Item Endpoints

Get Sales Order Line Items by Sales Order Id (GET)

[Base URL]/api/v2.0/companies/{company-id}/salesOrderLines?$filter=documentid eq {salesorder-id}

Get a Sales Order Line Item by Line No (GET)

[Base URL]/ODataV4/Company({company-name})/SalesOrderLines?$filter=No eq {salesorderline-no}Base URL]/api/v2.0/companies/{company-id}/salesOrderLines?$filter=documentid eq {salesorder-id}

Create a Sales Order Line Item (POST)

[Base URL]/ODataV4/Company({company-name})/SalesOrderLines

Update a Sales Order Line Item (PATCH)

[Base URL]/ODataV4/Company({company-name})/SalesOrderLines(Document_Type={document-type}, Document_No={document-no}, Line_No={line-no})

Sales Shipments Endpoints

Get Odatav4 Sale Shipments by Order Number (GET)

[BaseURL]/ODataV4/Company('{companyName}')/SalesShipments?$filter=Order_No eq '{id}'

Get ODatav4 Sale Shipments by Document Number(GET)

[Base URL]/ODataV4/Company ('{companyName}')/SalesShipmentLines?$filter=Document_No eq '{saleShipment.No}'

Shipping Method Endpoints

Get All Shipping Methods (GET)

[Base URL]/ODataV4/Company({company-name})/ShippingAgents?$top={limit}&$skip={Page*limit}

Get ODatav4 Shipping Method by Code (GET)

[Base URL]/ODataV4/Company('{companyName}')/ShippingAgents?$filter=Code eq '{Id}'

Poll Shipping Methods (GET)

[Base URL]/ ODataV4/Company('{companyName}')/ShippingAgents?$top={Limit}&$skip={Page * Limit}

Product Categories Endpoints

Get Product Categories by Code (GET)

[Base URL]/ODataV4/Company('{companyName}')/ItemCategories('{code}')

Poll Product Categories (GET)

[Base URL]/ ODataV4/Company('{companyName}')/ItemCategories?$top={Limit}&$skip={Page * Limit}

Product Endpoints

Get a Product by Id (GET)

[Base URL]/api/v2.0/companies/{company-id}/items/{product-id}

Get a Product by Number (GET)

[Base URL]/api/v2.0/companies/{company-id}/items?$filter=number eq {product-no}

Get ODatav4 Product by Number (GET)

[Base URL]/ODataV4/Company({company-name})/ItemCard({product-no})

Update a Product (PATCH)

[Base URL]/ODataV4/Company({company-name})/ItemCard({product-no})

Poll Products (GET)

[Base URL]/ api/v2.0/companies({companyId})/items?$top={Limit}&$skip={Page*Limit}&$filter=lastModifiedDateTime gt {utcTimeString}

Poll Products from SalesPrices (GET)

[Base URL]/ ODataV4/Company('{companyName}')/SalesPrices?$top={Limit}&$skip={Page * Limit}&$filter=SystemModifiedAt gt {utcTimeString}

Product Inventory Endpoints

Get Product Locations by Product Number (GET)

[Base URL]/ODataV4/Company('{companyName}')/itemsbylocation?$filter=No eq '{id}'

Get ODatav4 Product Location by Product Number and Location Code (GET)

[Base URL]/ODataV4/Company('{companyName}')/itemsbylocation?$filter=No eq '{id}' and Location_Code eq '{locationCode}'

Poll Product Locations (GET)

[Base URL]/api/v2.0/companies({companyId})/items?$top={Limit}&$skip={Page * Limit}&$filter=lastModifiedDateTime gt {utcTimeString}

Authorization Endpoints

  • Base URL: https://login.microsoftonline.com/

Get an Access Token for Client Credentials, Public App and Refresh Token (POST)

[Base URL]/{TenantId}/oauth2/v2.0/token

Utility/Generic Endpoints

Base URL: https://api.businesscentral.dynamics.com

Get a Product by Sku (GET)

[Base URL]/ODataV4/Company({companyName})/Items?$filter=No eq '{sku}'

Get a Country by Name (GET)

[Base URL]/ODataV4/Company({companyName})/Country?$filter=Name eq '{name}'

Get Company Id by Name (GET)

[Base URL]/ODataV4/Company('{companyName}')

Get a Location by Code (GET)

[Base URL]/api/v2.0/companies({companyId})/Locations?$filter=code eq '{Location}'

Get a Customer by Email (GET)

[Base URL]/api/v2.0/companies({companyId})/customers?$filter=email eq '{email}'

Get Customer Id by Number (GET)

[Base URL]/api/v2.0/companies({companyId})/customers?$filter=number eq '{number}'

Get Product Id by Sku (GET)

[Base URL]/api/v2.0/companies({companyId})/items?$filter=number eq '{sku}'

Get Sales Order Id by Transaction Number (GET)

[Base URL]/api/v2.0/companies({companyId})/salesOrders?$filter=number eq '{SalesOrderNumber}'

Get Sales Prices by Item No And Sales Code (GET)

[Base URL]/ODataV4/Company('{companyName}')/SalesPrices?$filter=Item_No eq '{itemNo}' and Sales_Code eq '{salesCode

Did this answer your question?