Create Customer

Create Customer

1. 1.Request Definition

  • API URL
https://base-api.swiftfederation.com/v1.1/createCustomer
  • Request Protocol
POST
  • Request Header

Request Header

  • Request Body
Field Data Type Required Description
name string M customer name
parentId Integer M parent id
type Short M 1 partner; 2 customer
  • Request Example
POST /v1.1/createCustomer HTTP/1.1
Host: base-api.swiftfederation.com

Authorization:HMAC-SHA256 V265i4K31j991E19:bc051d2e520a462e36455dc75b2bc68e9a135bbf4d2fefbf6d2fc1f28c5aa5dc
Content-Type:application/json; charset=utf-8
X-SFD-Date:20180926T131000Z
X-SFD-Nonce:69527

{"name":"apitest12","parentId":1,"type":1}

2. 2.Response Definition

This section is intended to describe response header and body data definition.

2.1. 2.1 Success Response

  • Success Response Body
Field Data Type Description
id Integer customer id
name string customer name
parentId Integer parent id
type Short 1 partner 2 customer
partnership Short Ignore this field
  • Success Response Body Example
HTTP/1.1 200

{
  "id": 10098,
  "name": "apitest12",
  "parentId": 1,
  "type": 1,
  "partnership": 1
}

2.2. 2.2 Error Response

  • Error Response Code

Error Code

  • Error Response Example
HTTP/1.1 400
{
"code":"CustomerId.Invalid",
"message":"CustomerId is empty or invalid."
}
HTTP/1.1 403
{
"code":"Permission.Forbidden",
"message":"Can't access according to this access key id."
}
HTTP/1.1 400
{
"code":"Name.Invalid",
"message":"Name is empty or invalid."
}
HTTP/1.1 400
{
"code":"ParentId.Invalid",
"message":"ParentId is empty or invalid."
}
HTTP/1.1 400
{
"code":"Type.Invalid",
"message":"Type is empty or invalid."
}
HTTP/1.1 400
{
"code":"Partnership.Invalid",
"message":"Partnership is not number or invalid."
}
HTTP/1.1 403
{
"code":"CustomerName.Conflict",
"message":"Can't execute because name exist."
}
HTTP/1.1 403
{
"code":"Parent.NotExist",
"message":"Can't execute because parentId does not exist."
}
HTTP/1.1 403
{
"code":"CustomerType.Invalid",
"message":"Can't execute because parent type is not partner."
}
© 2019 Conversant Solutions Pte Ltd. All rights reserved.            Updated 2019-04-01 17:49:20

results matching ""

    No results matching ""