Create Customer
Create a new customer.
Request
Request-Line
POST /sfd/v2.0/customers/{parentId}/childCustomers HTTP/1.1
Request Parameters
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
parentId | Integer | Mandatory | Parent customer ID. |
Body Parameters
Property name | Type | Required | Description |
---|---|---|---|
name | String | Mandatory | Name of the customer. |
type | Short | Mandatory | Customer type. 1 - Partner. 2 - Customer. |
Response
Response Body
Property name | Type | Required | Description |
---|---|---|---|
id | Integer | Mandatory | Unique identifier of the customer record. |
name | String | Mandatory | Name of the customer. |
parentId | Integer | Mandatory | Parent ID. |
type | Short | Mandatory | Customer type. 1 - Partner. 2 - Customer. |
partnership | Short | Optional | Ignore this field. |
Status Codes, Error Codes and Error Messages
Status Code | Error Code | Error Message |
---|---|---|
400 | Name.Invalid | Name is empty or invalid. |
400 | Type.Invalid | Type is empty or invalid. |
403 | CustomerName.Conflict | Can't execute because name exist. |
403 | CustomerLimit.Invalid | Can't execute because The number of customers has exceeded the limit. Please delete unnecessary customers or contact the administrator. |
403 | CustomerType.Invalid | Can't execute because parent type is not partner. |
Examples
Create Customer
Request
POST /sfd/v2.0/customers/123/childCustomers HTTP/1.1
{
"name": "apitest12",
"type": 1
}
Successful Response Body
{
"id": 10098,
"name": "apitest12",
"parentId": 123,
"type": 1,
"partnership": 1
}