createCards
createCards
Overview
This service allows you to create new card records.
It performs the same function as creating a card in the Cards / Card Details tab does.
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / Apis and check on Cards:Create .
This API is not configured for external use but can be made available on request.
Contact Catch-e Support to request this update.
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
URL Examples
https://api.demo.catch-e.com/authenticate https://api.{{environment}}.catch-e.com/authenticate https://api.test.catch-e.com/fm/cards Input Fields (Header)
Input Fields (Body)
Successful Response Example
{ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/cards/" } }, "_embedded": { "fm_cards": [ { "card_id": "100312", "contract_id": "104274", "card_number": "081412438765", "account_number": "4354365", "supplier_id": "100515", "posting_flag": "yes", "recharge_flag": "no", "client_id_recharge": "100240", "history_only_flag": "no", "activated_date": "2021-09-26", "inactivated_date": "2022-09-03", "expiry_date": "2023-09-03", "card_sub_status_id": "100001", "status_flag": "active", "notes": "kavyatest", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/cards/100312" } } } ] }, "total_items": 1 } Error Response Details
401 Unauthorized
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" }You have not authenticated before running this API or the token_timeout of the current session has passed. You need to authenticate again.
403 Forbidden
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" }You do not have permissions for this request. Go to System Roles and enter 'web_services'. Navigate to the Roles / APIs tab to make sure the permission you need to run this API is checked.
422 Failed Validation
}, "target_table": { "notInArray": "Unsupported target table" }, | "Unsupported target table
"contract_id": { "isEmpty": "Value is required and can't be empty"Contract_id is missing
"card_number": { "duplicateCardNumber": "The specified card number already exists"""The specified card number already exists with same supplier ".
"card_sub_status_id": { "noRecordFound": "No record matching the input was found"Enter a valid id from [fm_card_sub_statuses]
"client_id_recharge": { "noRecordFound": "No record matching the input was found" "expiry_date": { "dateFalseFormat": "The input does not fit the date format 'Y-m-d'", "dateInvalidDate": "The input does not appear to be a valid date"Invalid date
"posting_flag": { "rechargeClientRequired": "Recharge A/c be blank if 'Posting Enabled' is checked on"' Recharge A/c' cannot be blank if 'Posting Enabled' is checked on!
"supplier_id": { "noRecordFound": "No record matching the input was found"500 - Internal Error
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 0, "detail": "string" }You do not have permissions for this request.
Was this helpful?
More in Card & Card Import APIs
getCardImportResultprocessCardImportgetCardImportErrorscreateCardImportStill need help? Ask the team