Skip to main content

Create Customer

Create a new customer.

Request

Request-Line

POST /sfd/v2.0/customers/{parentId}/childCustomers HTTP/1.1

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
parentIdIntegerMandatoryParent customer ID.

Body Parameters

Property nameTypeRequiredDescription
nameStringMandatoryName of the customer.
typeShortMandatoryCustomer type.
1 - Partner.
2 - Customer.

Response

Response Body

Property nameTypeRequiredDescription
idIntegerMandatoryUnique identifier of the customer record.
nameStringMandatoryName of the customer.
parentIdIntegerMandatoryParent ID.
typeShortMandatoryCustomer type.
1 - Partner.
2 - Customer.
partnershipShortOptionalIgnore this field.

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Name.InvalidName is empty or invalid.
400Type.InvalidType is empty or invalid.
403CustomerName.ConflictCan't execute because name exist.
403CustomerLimit.InvalidCan't execute because The number of customers has exceeded the limit. Please delete unnecessary customers or contact the administrator.
403CustomerType.InvalidCan'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
}