Adds a new credit card to customer in the database
- Requires API Key: Yes
- Requires System Administrator: No
- Requires Counterpoint Registration option: Yes
URI
POST https://localhost:81/customer/{custNo}/CARD
Headers
Authorization : Basic UUFUZXN0R29sZi5NR1I6cGFzc3dvcmQx
APIKey : vpmk0tqApzFu5EesAMQgstBtQAEwK1ySwMZ4zwiC
Accept : application/json
Content-Type : application/json
Request Body
{"AR_CUST_CARD":{
"CARD_DESCR": "Mark2",
"DEFAULT_CARD": "N",
"PAY_COD": "VISA",
"CARD_EXP_DAT": "1/1/2018",
"CARD_NO": "4275330012345675",
"CARD_NAM": "{{CardName}}"
}
}
Name | Parameter Type | Data Type | Required | Description |
---|---|---|---|---|
CardName | body | string | false | The card name description of the card being added. |
AR_CUST_CARD | body | string | true | A JSON structure containing the customer card data to add. |
NOTE: Whenever possible, the template customer is used to determine defaults for fields that aren't provided explicitly. The template customer is obtained from the record of the provided workgroup (WRKGRP_ID). If a WKRGRP_ID isn't provided, the default workgroup for the logged in user is used. |
AR_CUST_CARD | Required | Field Description |
---|---|---|
DEFAULT_CARD | * | Indicates whether the card is a default card |
CARD_DESCR | ||
PAY_COD | * | Indicates the type of paycode of the card. |
CARD_NO | ||
CARD_EXP_DAT | * | The expiration date of credit card. |
CARD_NAM |
201 Created
The request was successful, the customer was added to the Counterpoint database.401 Unauthorized
The request could not be fulfilled. Likely due to a missing or invalid authorization header.403 Forbidden
The request could not be fulfilled. Likely due to a missing, invalid, or expired APIKey, or a missing API option in the company's registration.ini500 Internal Server Error
The request could not be fulfilled due to an unexpected internal error. This could be caused by a bug in the system, an unavailable database, or any other unexpected internal problem processing the request.
The following error codes may be returned from requests to this endpoint:
SUCCESS
: The request was successful and the customer was added to the Counterpoint database.ERROR_UNKNOWN
: An unexpected error occurred adding the customer. See the Message field for more details.
This endpoint returns data related the customer just added:
{
"CUST_NO": "100024",
"reference": "Customer",
"Link": {
"uri": "http://localhost:81/CUSTOMER/100024",
"method": "get"
},
"ErrorCode": "SUCCESS"
}
Field | Description |
---|---|
CUST_NO | The CUST_NO of the customer record just adeed to the system. |
reference | The type of object just added. |
Link | Contains the URI and http verb that can be used to retrieve the object that was just added. |
ErrorCode | "SUCCESS" if the call was succesful, otherwise, an error code describing the cause for failure. |
Message | When the ErrorCode is not "SUCCESS", Message will contain a human readable description of the error. Otherwise, this field will not be present in the response. |