Skip to main content
API Overview

API Overview for CP Extender

Updated yesterday

All communication with CP Extender will be made using a BaseUrl and in some cases a port. The notation in this will use properties {{BaseUrl}} and {{Port}} to reflect these settings. You will need to retrieve these from the customer before connecting.

Security

A bearer token is required to access most endpoints. Where this is required, it is noted by each end-point. Please obtain your login credentials to retrieve a bearer token from the API.

Permanent Bearer Tokens can be assigned, but not requested during login.

Connecting

Throughout this documentation you will find references to Controllers, Methods, and Parameters which will be appended to the BaseUrl and Port using this format.

https://{{BaseUrl}}:{{Port}}/Controller/Method/{{Id}}

Required Headers

All requests are required to have the content-type header set to application/json.

Methods that are marked Bearer for security are required to have the Authorization header as shown below.

Content-Type : application/json

Authorization : Bearer {{bearer token}}

Controllers

/Status

/GetVersion

/Login

/Catalog

/Inventory

/Product Detail

/Product Variant Detail

/Images/Product

/Images/Customer

/FromEmail

/FromId

/ReserveIds

/BalanceCheck

/Create

/Authorize

/BalanceCheck (Include History?)

/Earn

/Authorize

/Cancel

/Confirm

/{{id}}

/Order

Controller: Connection

Method: Connection/Status

Security: No Auth

Type: GET

URL: https://{{BaseUrl}}:{{Port}}/Connection/Status

Response: Http Status 200

{ "Status": "Ok", "GlobalDefaults": { "eCommerceControlDefaults": { "StrId": "99", "DrwId": "99" }, "installationSettings": { "UsrId": "Z", "MgGcProductType": "giftvoucher", "CpGcItemNo": "GIFTCARD" } } }

Method: Connection/GetVersion

Security: No Auth

Type: GET

URL: https://{{BaseUrl}}:{{Port}}/Connection/GetVersion

Response: HTTP Status 200

Response Body:

{ "Version": "1.0.0.0" }

Controller: SSO

Method: SSO/Login

Security: No Auth

Type: POST

Request Body:

{ "UserName":"Username", "Password":"pw" }

Response: HTTP Status 200

Response Body:

{ "APItoken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IkFsYWJhbWFPdXRkb29ycyIsIm5iZiI6MTU4MjY1NjODI2NTYxMDh9.tn7PsSubicjd_ITmwhRRCGh_vv-jLJQhaopPfluyUjc" }


โ€‹

Did this answer your question?