顧客を作成するCreate customers

Dynamics 365 Business Central で customer オブジェクトを作成します。Create a customer object in Dynamics 365 Business Central.

アクセス許可Permissions

この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

アクセス許可の種類Permission type アクセス許可 (特権の小さいものから大きいものへ)Permissions (from least to most privileged)
委任 (職場または学校のアカウント)Delegated (work or school account) Financials.ReadWrite.AllFinancials.ReadWrite.All
委任 (個人 Microsoft アカウントDelegated (personal Microsoft account サポートされていません。Not supported.
アプリケーションApplication Financials.ReadWrite.AllFinancials.ReadWrite.All

HTTP 要求HTTP request

POST /financials/companies('{id}')/customers

オプションのクエリ パラメーターOptional query parameters

このメソッドは、応答をカスタマイズするための OData クエリ パラメーターをサポートします。This method supports the OData Query Parameters to help customize the response.

要求ヘッダーRequest headers

ヘッダーHeader Value
AuthorizationAuthorization ベアラー {トークン}。必須。Bearer {token}. Required.
Content-TypeContent-Type application/jsonapplication/json

要求本文Request body

要求本文で、 customersオブジェクトの JSON 表記を指定します。In the request body, supply a JSON representation of customers object.

応答Response

成功した場合、この201 Createdメソッドは応答コードと、応答本文でcustomersオブジェクトを返します。If successful, this method returns 201 Created response code and a customers object in the response body.

Example

要求Request

要求の例を次に示します。Here is an example of a request.

POST https://graph.microsoft.com/beta/financials/companies('{id}')/customers
Content-type: application/json

{
  "number": "10000",
  "displayName": "Coho Winery",
  "type": "Company",
  "address": {
    "street": "192 Market Square",
    "city": "Atlanta",
    "state": "GA",
    "countryLetterCode": "US",
    "postalCode": "31772"
  },
  "phoneNumber": "",
  "email": "jim.glynn@cronuscorp.net",
  "website": "",
  "taxLiable": true,
  "taxAreaId": "taxAreaId-value",
  "taxAreaDisplayName": "tax area",
  "taxRegistrationNumber": "28012001T",
  "currencyId": "currencyId-value",
  "currencyCode": "USD",
  "paymentTermsId": "paymentTermsId-value",
  "shipmentMethodId": "shipmentMethodId-value",
  "paymentMethodId": "paymentMethodId-value",
  "blocked": " ",
  "overdueAmount": 0,
  "totalSalesExcludingTax": 0,
}

応答Response

以下は、応答の例です。Here is an example of the response.

: ここに示す応答オブジェクトは読みやすいように短縮される場合があります。Note: The response object shown here might be shortened for readability. 実際の呼び出しではすべてのプロパティが返されます。All the properties will be returned from an actual call.

HTTP/1.1 201 Created
Content-type: application/json

{
  "id": "id-value",
  "number": "10000",
  "displayName": "Coho Winery",
  "type": "Company",
  "address": {
    "street": "192 Market Square",
    "city": "Atlanta",
    "state": "GA",
    "countryLetterCode": "US",
    "postalCode": "31772"
  },
  "phoneNumber": "",
  "email": "jim.glynn@cronuscorp.net",
  "website": "",
  "taxLiable": true,
  "taxAreaId": "taxAreaId-value",
  "taxAreaDisplayName": "tax area",
  "taxRegistrationNumber": "28012001T",
  "currencyCode": "USD",
  "blocked": " ",
  "balance": 0,
  "overdueAmount": 0,
  "totalSalesExcludingTax": 0,
  "lastModifiedDateTime": "2017-03-07T00:35:28.983Z"
}