Assign a bulk card
POST/customers/:customerId/prepaid/cards/:cardId/assignments
The endpoint can be used to assign a specific card to a given customer. It is applicable only for cards created through the Bulk Card Ordering
endpoint. Once assigned, a card cannot be re-assigned.
Request
Path Parameters
The customer ID to which the specific card belongs.
UUID based Card id.
- application/json
Body
In order to assign an already existing card created through the Bulk Card Ordering
endpoint, only a targetCustomerId
needs to be provided in the request body.
targetCustomerId
- the customer ID to which the card will be assigned.
The customer ID to which a specific card will be assigned.
Responses
- 200
- 400
- 401
- 404
- 500
- 503
OK
- application/json
- Schema
- Example (from schema)
- SUCCESSFULLY_ASSIGNED_CARD
Schema
The customer ID to which a specific card will be assigned.
Card id is a unique identifier for a specific card. It will be used for most operations to the prepaid card.
The customer ID to which the specific card belongs.
{
"targetCustomerId": "1233333323",
"cardId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerId": "1231122232"
}
{
"cardId": "f16ba382-eb42-481a-b08f-c57bdc9aae24",
"customerId": "1231122232",
"targetCustomerId": "1233333323"
}
Bad Request
- application/json
- Schema
- Example (from schema)
- ALREADY_ASSIGNED_CARD
- ASSIGN_TO_CUSTOMER_NOT_FOUND
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "DW-PREPAID-CARDS-ALREADY-ASSIGNED-CARD",
"message": "The provided cardId is already assigned.",
"details": [
"The provided cardId is already assigned to a customer."
]
}
}
{
"error": {
"code": "DW-NO-SUCH-CUSTOMER",
"message": "Customer was not found.",
"details": [
"The provided targetCustomerId was not found in the system."
]
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- INVALID_CREDENTIALS
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "5279",
"message": "Invalid credentials",
"details": [
"The authentication credentials are invalid."
]
}
}
Not Found
- application/json
- Schema
- Example (from schema)
- NO_SUCH_CUSTOMER
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "DW-NO-SUCH-CUSTOMER",
"message": "Customer was not found",
"details": [
"No customer matching the provided customerId was found."
]
}
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- INTERNAL_SERVER_ERROR
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "DW-INTERNAL-SERVER-ERROR",
"message": "Internal Server Error",
"details": [
"There was an error while processing the operation"
]
}
}
Service Unavailable
- application/json
- Schema
- Example (from schema)
- SERVICE_UNAVAILABLE
Schema
Array [
]
error
object
Represents details of an error.
The error code.
The description of the error.
Details for the errors of any parameter value.
fieldErrors
object[]
List of field errors associated with the main error.
Identifies the JSON request field.
The problem associated with the field.
{
"error": {
"code": "string",
"message": "string",
"details": [
"string"
],
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}
}
{
"error": {
"code": "DW-SERVICE-UNAVAILABLE",
"message": "Service Unavailable",
"details": [
"Service Unavailable"
]
}
}