Create Card - Error Responses
List of all possible error response payloads for the create card endpoint.
Account is not live
{
"resource": "/v1/programs/d673f4bb-8735-4d64-b835-387b60716af4/cards/",
"status": 400,
"error": {
"code": "account",
"date": "2021-01-07T14:53:18.968Z",
"message": "Account is not live"
},
"execution": 306.154359
}
Account with role that is not account
or developer
{
"resource": "/v1/programs/d673f4bb-8735-4d64-b835-387b60716af4/cards/",
"status": 401,
"error": {
"code": "identity",
"date": "2021-01-07T14:54:41.230Z",
"message": "Identity does not have permission"
},
"execution": 123.606363
}
Card not yet supported
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "cards",
"date": "2020-10-12T14:36:07.230Z",
"message": "Card not yet supported",
"metadata": {
"extendedMessageError": "This scheme is not active for the selected country or for your account."
}
},
"execution": 22.431319
}
Amex is not yet supported
{
"resource": "/v1/programs/465ddde7-9370-4d13-9db5-db43a32fcd26/cards",
"status": 400,
"error": {
"code": "cards",
"date": "2020-10-12T15:21:26.069Z",
"message": "Amex is not yet supported",
"metadata": {
"extendedMessageError": "The program wasn't yet sync to amex or no location is active."
}
},
"execution": 18.98804
}
The program does not exist
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260be/cards",
"status": 400,
"error": {
"code": "item-exists",
"class": "program",
"date": "2020-10-12T14:38:44.986Z",
"message": "Item does not exist"
},
"execution": 64.587798
}
The program is not active
{
"resource": "/v1/programs/d673f4bb-8735-4d64-b835-387b60716af4/cards/",
"status": 400,
"error": {
"code": "cards",
"date": "2021-01-07T14:30:48.349Z",
"message": "Program is not active"
},
"execution": 309.568441
}
Error linking card with card networks
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "cards",
"date": "2020-10-12T13:56:13.119Z",
"message": "Error linking card",
"resource": "/v1/cards/4cc18654-abd1-433b-8859-f8a11f508192"
},
"execution": 7964.708565
}
The card is already linked. Existing cardId
returned in the resource
property.
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "map.already.exists",
"date": "2020-10-12T14:31:21.934Z",
"message": "Card already linked",
"resource": "/v1/cards/4bb39402-17dd-4431-8fed-f6135f183702"
},
"execution": 384.250391
}
The card number is not valid
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "cards",
"date": "2020-10-12T14:33:38.415Z",
"message": "Invalid card"
},
"execution": 27.205873
}
Test Card Errors
The test card number provided is not valid. Only returned for test card numbers.
{
"resource": "/v1/programs/3584bc35-a45e-4734-bf6b-b157e920f371/cards",
"status": 400,
"error": {
"code": "cards",
"date": "2020-10-12T16:02:10.013Z",
"message": "Invalid test card",
"metadata": {
"extendedMessageError": "On test mode, you have a limited amount of cards numbers to test. Use one of the examples at: https://fidel.uk/docs/cards/#testing-card-numbers"
}
},
"execution": 47.49519
}
Error linking test card. Only returned for test card numbers.
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "cards",
"date": "2020-10-12T13:56:13.119Z",
"message": "Error linking card (test fail linking event)",
"resource": "/v1/cards/4cc18654-abd1-433b-8859-f8a11f508192"
},
"execution": 7964.708565
}
Schema Errors
Card number required
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T09:28:50.690Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "required",
"dataPath": "",
"schemaPath": "#/required",
"params": {
"missingProperty": "number"
},
"message": "should have required property 'number'"
}
]
},
"execution": 336.999077
}
Expiry month required
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T11:46:53.054Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "required",
"dataPath": "",
"schemaPath": "#/required",
"params": {
"missingProperty": "expMonth"
},
"message": "should have required property 'expMonth'"
}
]
},
"execution": 404.102896
}
Expiry month must be a number
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T11:50:15.985Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "type",
"dataPath": ".expMonth",
"schemaPath": "#/properties/expMonth/type",
"params": {
"type": "number"
},
"message": "should be number"
}
]
},
"execution": 15.216466
}
Maximum value for expiry month is 12
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards/",
"status": 400,
"error": {
"code": "schema",
"date": "2021-01-07T09:53:45.625Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "maximum",
"dataPath": ".expMonth",
"schemaPath": "#/properties/expMonth/maximum",
"params": {
"comparison": "<=",
"limit": 12,
"exclusive": false
},
"message": "should be <= 12"
}
]
},
"execution": 80.075445
}
Minimum value for expiry month is 1
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards/",
"status": 400,
"error": {
"code": "schema",
"date": "2021-01-07T09:55:35.441Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "minimum",
"dataPath": ".expMonth",
"schemaPath": "#/properties/expMonth/minimum",
"params": {
"comparison": ">=",
"limit": 1,
"exclusive": false
},
"message": "should be >= 1"
}
]
},
"execution": 103.816008
}
Expiry year required
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T11:48:02.580Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "required",
"dataPath": "",
"schemaPath": "#/required",
"params": {
"missingProperty": "expYear"
},
"message": "should have required property 'expYear'"
}
]
},
"execution": 305.433582
}
Expiry year must be a number
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T11:51:38.063Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "type",
"dataPath": ".expYear",
"schemaPath": "#/properties/expYear/type",
"params": {
"type": "number"
},
"message": "should be number"
}
]
},
"execution": 67.763978
}
Maximum value for expiry year is 2040
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards/",
"status": 400,
"error": {
"code": "schema",
"date": "2021-01-07T09:52:50.488Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "maximum",
"dataPath": ".expYear",
"schemaPath": "#/properties/expYear/maximum",
"params": {
"comparison": "<=",
"limit": 2040,
"exclusive": false
},
"message": "should be <= 2040"
}
]
},
"execution": 309.280312
}
Minimum value for expiry year is equal to current calendar year
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards/",
"status": 400,
"error": {
"code": "schema",
"date": "2021-01-07T09:50:51.843Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "minimum",
"dataPath": ".expYear",
"schemaPath": "#/properties/expYear/minimum",
"params": {
"comparison": ">=",
"limit": 2021,
"exclusive": false
},
"message": "should be >= 2021"
}
]
},
"execution": 221.654054
}
Country code required
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T11:48:43.298Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "required",
"dataPath": "",
"schemaPath": "#/required",
"params": {
"missingProperty": "countryCode"
},
"message": "should have required property 'countryCode'"
}
]
},
"execution": 175.682836
}
Country code must be one of available values
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T11:49:13.093Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "enum",
"dataPath": ".countryCode",
"schemaPath": "#/properties/countryCode/enum",
"params": {
"allowedValues": [
"CAN",
"DNK",
"FIN",
"GBR",
"IRL",
"JPN",
"NOR",
"SWE",
"USA"
]
},
"message": "should be equal to one of the allowed values"
}
]
},
"execution": 19.091095
}
Terms of use must be a boolean value
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T11:52:11.896Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "type",
"dataPath": ".termsOfUse",
"schemaPath": "#/properties/termsOfUse/type",
"params": {
"type": "boolean"
},
"message": "should be boolean"
}
]
},
"execution": 19.636419
}
Terms of use must be set to the boolean value true
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-13T11:52:52.071Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "enum",
"dataPath": ".termsOfUse",
"schemaPath": "#/properties/termsOfUse/enum",
"params": {
"allowedValues": [
true
]
},
"message": "should be equal to one of the allowed values"
}
]
},
"execution": 13.4011
}
Invalid JSON object size
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards/",
"status": 400,
"error": {
"code": "schema",
"date": "2021-01-07T12:11:43.387Z",
"message": "Invalid object size"
},
"execution": 1.913666
}
metadataId
must not be shorter than 5 characters
{
"resource": "/v1/programs/d673f4bb-8735-4d64-b835-387b60716af4/cards/",
"status": 400,
"error": {
"code": "schema",
"date": "2021-01-07T12:19:09.573Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "minLength",
"dataPath": ".metadata.id",
"schemaPath": "#/properties/metadata/properties/id/minLength",
"params": {
"limit": 5
},
"message": "should NOT be shorter than 5 characters"
}
]
},
"execution": 34.593849
}
metadataId
must not be longer than 40 characters
{
"resource": "/v1/programs/d673f4bb-8735-4d64-b835-387b60716af4/cards/",
"status": 400,
"error": {
"code": "schema",
"date": "2021-01-07T12:21:24.870Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "maxLength",
"dataPath": ".metadata.id",
"schemaPath": "#/properties/metadata/properties/id/maxLength",
"params": {
"limit": 40
},
"message": "should NOT be longer than 40 characters"
}
]
},
"execution": 101.994789
}
Missing "content-type": "application-json"
header
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 400,
"error": {
"code": "schema",
"date": "2020-10-14T13:11:02.396Z",
"message": "Invalid schema",
"metadata": [
{
"keyword": "type",
"dataPath": "",
"schemaPath": "#/type",
"params": {
"type": "object"
},
"message": "should be object"
}
]
},
"execution": 460.126867
}
Request Errors
Syntax error in request body
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards/",
"status": 400,
"error": {
"code": "SyntaxError",
"message": "Unexpected token } in JSON at position 174"
},
"execution": 0.818231
}
The fidel-key
provided is not valid
{
"resource": "/v1/programs/27f608d1-2117-4d60-95a9-9cfe200260bc/cards",
"status": 401,
"error": {
"code": "credential",
"date": "2020-10-14T13:10:22.109Z",
"message": "Fidel-Key is not valid"
},
"execution": 58.373542
}
The request URL is not valid
{
"message": "Missing Authentication Token"
}