{
  "opencollection": "1.0.0",
  "info": {
    "name": "Microsoft Dynamics 365 Business Central API v2.0",
    "version": "v2.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
      "accessTokenUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Companies",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List companies",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies"
          },
          "docs": "List companies"
        },
        {
          "info": {
            "name": "Get a company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:id)",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ]
          },
          "docs": "Get a company"
        }
      ]
    },
    {
      "info": {
        "name": "Customers",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List customers in a company",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/customers",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "$expand",
                "value": "",
                "type": "query"
              },
              {
                "name": "$filter",
                "value": "",
                "type": "query"
              },
              {
                "name": "$top",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "List customers in a company"
        },
        {
          "info": {
            "name": "Create a customer",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/customers",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a customer"
        },
        {
          "info": {
            "name": "Get a customer",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/customers(:id)",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              },
              {
                "name": "$expand",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Get a customer"
        },
        {
          "info": {
            "name": "Update a customer",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/customers(:id)",
            "headers": [
              {
                "name": "If-Match",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a customer"
        },
        {
          "info": {
            "name": "Delete a customer",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/customers(:id)",
            "headers": [
              {
                "name": "If-Match",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ]
          },
          "docs": "Delete a customer"
        }
      ]
    },
    {
      "info": {
        "name": "Vendors",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List vendors",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/vendors",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ]
          },
          "docs": "List vendors"
        },
        {
          "info": {
            "name": "Create a vendor",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/vendors",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a vendor"
        },
        {
          "info": {
            "name": "Get a vendor",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/vendors(:id)",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ]
          },
          "docs": "Get a vendor"
        },
        {
          "info": {
            "name": "Update a vendor",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/vendors(:id)",
            "headers": [
              {
                "name": "If-Match",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a vendor"
        },
        {
          "info": {
            "name": "Delete a vendor",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/vendors(:id)",
            "headers": [
              {
                "name": "If-Match",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ]
          },
          "docs": "Delete a vendor"
        }
      ]
    },
    {
      "info": {
        "name": "Items",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List items",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/items",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ]
          },
          "docs": "List items"
        },
        {
          "info": {
            "name": "Create an item",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/items",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create an item"
        },
        {
          "info": {
            "name": "Get an item",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/items(:id)",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ]
          },
          "docs": "Get an item"
        },
        {
          "info": {
            "name": "Update an item",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/items(:id)",
            "headers": [
              {
                "name": "If-Match",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update an item"
        },
        {
          "info": {
            "name": "Delete an item",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/items(:id)",
            "headers": [
              {
                "name": "If-Match",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ]
          },
          "docs": "Delete an item"
        }
      ]
    },
    {
      "info": {
        "name": "SalesOrders",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List sales orders",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/salesOrders",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ]
          },
          "docs": "List sales orders"
        },
        {
          "info": {
            "name": "Create a sales order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/salesOrders",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a sales order"
        },
        {
          "info": {
            "name": "Get a sales order",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/salesOrders(:id)",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ]
          },
          "docs": "Get a sales order"
        },
        {
          "info": {
            "name": "Update a sales order",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/salesOrders(:id)",
            "headers": [
              {
                "name": "If-Match",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a sales order"
        },
        {
          "info": {
            "name": "Delete a sales order",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/salesOrders(:id)",
            "headers": [
              {
                "name": "If-Match",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "GUID identifier"
              }
            ]
          },
          "docs": "Delete a sales order"
        }
      ]
    },
    {
      "info": {
        "name": "SalesInvoices",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List sales invoices",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/salesInvoices",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ]
          },
          "docs": "List sales invoices"
        },
        {
          "info": {
            "name": "Create a sales invoice",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/salesInvoices",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a sales invoice"
        }
      ]
    },
    {
      "info": {
        "name": "PurchaseOrders",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List purchase orders",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/purchaseOrders",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ]
          },
          "docs": "List purchase orders"
        },
        {
          "info": {
            "name": "Create a purchase order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.businesscentral.dynamics.com/v2.0/{environment}/api/v2.0/companies(:companyId)/purchaseOrders",
            "params": [
              {
                "name": "companyId",
                "value": "",
                "type": "path",
                "description": "Company GUID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a purchase order"
        }
      ]
    }
  ],
  "bundled": true
}