Cards & Attachments API: Get a card by card id
API endpoints for card management and file attachments
Get a card by card id
This service allows you to retrieve card details based on the given card_id.
This method requires the Cards:Get permission to be associated with your role.
Note:- deleted records cannot be returned.
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:Get **.
Note: This API is not configured for external use.
Contact your Account Manager to discuss access to this API.
HTTP Method
Use the HTTP Method 'GET' for consuming this web service.
URL Examples
https://api.demo.catch-e.com/authenticatehttps://api..catch-e.com/authenticatehttps://api.test.catch-e.com/fm/cards/100313Input Fields (Body)
Successful Response Example
{ "card_id": "100313", "contract_id": "100313", "card_number": "10098799", "account_number": "123456", "supplier_id": "100514", "posting_flag": "yes", "recharge_flag": "no", "client_id_recharge": "100077", "history_only_flag": "no", "activated_date": "0000-00-00", "inactivated_date": "0000-00-00", "expiry_date": "0000-00-00", "card_sub_status_id": "0", "status_flag": "inactive", "notes": "", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/cards/100313" } }}Error Response Details
{ "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. |
| 422- Failed Validation | | |
{ "validation_messages": { "contract_id": { "isEmpty": "Value is required and can't be empty" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"| Contract_id is missing |
| 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 - noRecordFound | | |
{ "validation_messages": { "attachment_id": { "noRecordFound": "No record matching the input was found" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}}| No object available in the system |
| 500 - Internal Error | | |
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 0, "detail": "string"}Get a list of cards
This service allows you to retrieve all of the available cards.
This method requires the Cards:Get permission to be associated with your role.
Note:- deleted records cannot be returned
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:Get **.
Note: This API is not configured for external use.
Contact your Account Manager to discuss access to this API.
HTTP Method
Use the HTTP Method 'GET' for consuming this web service.
URL Examples
https://api.demo.catch-e.com/authenticatehttps://api..catch-e.com/authenticatehttps://api.test.catch-e.com/fm/cardsInput Fields (Body)
Wildcard % operator notes:
If you are using "Postman" app, with the wildcard operator, the search string of either %ab% or %ba%, will give this response:
"field_name": {"isEmpty": "Value is required and can't be empty"}.If you need to search either %ab% or %ba%, please use %25ab%25 or %25ba%25 as required to return results as expected.
Successful Response Example
{ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/cards/?page=1" }, "first": { "href": "https://api.test.catch-e.com/fm/cards/" }, "last": { "href": "https://api.test.catch-e.com/fm/cards/?page=12" }, "next": { "href": "https://api.test.catch-e.com/fm/cards/?page=2" } }, "_embedded": { "fm_cards": [ { "card_id": "100000", "contract_id": "100237", "card_number": "12377734", "account_number": "", "supplier_id": "100459", "posting_flag": "no", "recharge_flag": "yes", "client_id_recharge": "100007", "history_only_flag": "no", "activated_date": "2005-07-01", "inactivated_date": "0000-00-00", "expiry_date": "2008-12-01", "card_sub_status_id": "0", "status_flag": "inactive", "notes": null, "_links": { "self": { "href": "https://api.test.catch-e.com/fm/cards/100000" } } },Error Response Details
{ "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. |
| 422- Failed Validation | | |
"validation_messages": { "supplier_id": { "noRecordFound": "No record matching the input was found"| The supplier does not exist or the Suppliers / Account "Supplier type" is not 'Card Services'. |
| 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. |
| 500 - Internal Error | | |
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 0, "detail": "string"}Get a list of configured suppliers
Overview
Allows you to retrieve a list of configured suppliers.
This method requires the Suppliers:Get permission to be associated with your role.
By default only 'admin' role is linked in
HTTP Method
Use the HTTP Method 'GET' for consuming this web service.
Input Fields (Header)
- Header should contain the 'Content-Type' Key with the Value = 'application/json' or 'application/hjson'.
Input Fields (Body)
Input URL Examples
For a list of Asset Types:
https://api.catch-e.com/fm/suppliers?page=1&page_size=5(Successful) Output Example
{ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/suppliers/?page=1" }, "first": { "href": "https://api.test.catch-e.com/fm/suppliers/" }, "last": { "href": "https://api.test.catch-e.com/fm/suppliers/?page=112" }, "next": { "href": "https://api.test.catch-e.com/fm/suppliers/?page=2" } }, "_embedded": { "supplier": [ { "supplier_id": 100000, "name": "AAB Vehicles R Us", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/suppliers/100000" } } }, { "supplier_id": 100001, "name": "A-Z Vehicles R Us", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/suppliers/100001" } } }, { "supplier_id": 100002, "name": "AAA Vehicles R Us", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/suppliers/100002" } } }, { "supplier_id": 100003, "name": "Sample Automotive Service Supplier", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/suppliers/100003" } } }, { "supplier_id": 100004, "name": "OZ Automotive Service Supplier", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/suppliers/100004" } } } ] }, "page_count": 112, "page_size": 5, "total_items": 557, "page": 1}Error Codes
Example error output
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized"}Get a supplier by supplier id
Overview
Allows you to retrieve Supplier details.
This method requires the Suppliers:Get permission to be associated with your role.
By default only 'admin' role is linked in
HTTP Method
Use the HTTP Method 'GET' for consuming this web service.
Input Fields (Header)
- Header should contain the 'Content-Type' Key with the Value = 'application/json' or 'application/hjson'.
Input Fields (Path)
Input URL Examples
For supplier details
https://api.catch-e.com/fm/suppliers/:supplierId(Successful) Output Example
{ "supplier_id": 100002, "supplier_group_id": 0, "external_code": "", "supplier_code": "AAA106", "name": "AAA Vehicles R Us", "supplier_type": null, "preferred_supplier_flag": "no", "interface_type": null, "gl_code": "", "supplier_id_agent": 0, "template_id_coc": 0, "status": "Active", "address1": "10 Downing Street", "address2": "Plaza Complex", "city": "Sydney", "state": "NSW", "postcode": 2000, "phone": "02 999 2020", "mobile": null, "fax": "", "email": "sandra.connor@catch-e.com.au", "website": "", "salutation": "", "contact": "", "payment_due": "Day of Month after EOM", "due_days": "30th after", "payment_delivery_type": "email", "account": "", "account_contact": null, "account_phone": null, "account_email": null, "payment_method": "", "aba_format_type": "supplier", "bank_bsb": null, "bank_account_number": null, "bpay_biller_code": null, "rcti_flag": "no", "discount_days": "1st after EOM", "discount_prompt_pay": 0, "payment_term": "Net 30th after EOM", "credit_limit": 0, "discount_volumn": 0, "tax_id": "", "tax_code_freight": "GST", "tax_code": "GST", "abn": "12 123 123 123", "labour_rate": null, "labour_rate_date": null, "parts_discount": 0, "sundries_cost": 0, "insurance_broker_fee_monthly": 0, "oil_price_per_litre": 0, "procurement_fee": 0, "pl_export_flag": "yes", "allow_duplicate_reference_flag": "no", "note": null, "dirty_flag": "2015-04-30 08:03:43", "_links": { "self": { "href": "https://api.test.catch-e.com/fm/suppliers/100002" } }}Error Codes
Example error output
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Invalid supplier id"}Get an attachment by attachment id
Allows you to get an existing attachment..
To obtain the attachment binary contents:
capture the binary stream from the url returned from the getAttachmentPresignedUrl method
invoke this API preferencing the 'application/octet-stream' response
This method requires the Attachments:Get permission to be associated with your role.
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 Attachments:Get
HTTP Method
Use the HTTP Method 'GET' for consuming this web service.
URL Examples
https://api.demo.catch-e.com/authenticatehttps://api..catch-e.com/authenticatehttps://api.test.catch-e.com/gb/attachments/100000Input Fields (Body)
Input Fields (JSON)
{ attchment_id = 100000}Successful Response Example
{ "attachment_id": "100074", "table_name": "fm_approvals", "record_id": 103366, "filename": "Unable to save quote", "extension": "docx", "md5": "f796bb9ae9c076e44bc001e62fe421cb", "file_size": 0, "notes": "", "user_id": "10824", "created": "2011-11-25T01:57:50Z", "duplicate_check": true, "status_flag": "active", "_links": { "self": { "href": "https://api.test.catch-e.com/gb/attachments/100074" } }}Error Response Details
{ "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. |
| 404 - Not Found | | |
{ { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Attachment object not found"}| Missing attachment /Object not found |
| 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 - noRecordFound | | |
{ "validation_messages": { "attachment_id": { "noRecordFound": "No record matching the input was found" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}}| No object available in the system |
| 500 - Internal Error | | |
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 0, "detail": "string"}