API endpoints for ISF
Webhook example for “ISF” application
The entire process of receiving information about the purchased subscription, obtaining the API key, and installing the application is analogous to the: instructions
The information contained in the “Turning on the application” event differs from the standard application, where, in addition to the data set from the documentation (How to prepare the application?), the services selected by the merchant are sent.
Request:
POST: url_webhook_new_license
{
client_id: (int) //client id
application_id: (int) // application id
api_url: (string) //address to api admin
api_key: (string) // access key
api_license: (string) // license number
sign: (string) // communication signature
contact_data: {
name: (string)
email: (string)
phone: (string)
}
isf_services: [
{
country_code: (string) // country code, e.g. 'pl','de'
company_key: (string) // courier company key, e.g. ‘courier_name’
courier_id: (int) // is of the courier service, e.g. 2941015
}
]
}
Response:
{
status: ok | error // status
sign: (string) // communication signature
}Installation of online applications
In the case of ISF applications, the endpoint /installation/done also changes, an example of which is given below:
Request:
POST: https://apps.idosell.com/api/application/installation/done
{
api_license: (string) //license number
application_id: (int) // application id
developer: (string) // developer login
sign: (string) // communication signature
isf_login: (string) // login for courier services
isf_password: (string) // password for courier services
}
Response:
{
status: ok | error // status
sign: (string) // communication signature
}You are required to provide an encrypted login and password.
How to encrypt your ISF login/password:
$iv = trim(@file_get_contents('https://apps.idosell.com/keyset')); $isf_login = base64_encode(openssl_encrypt('login', 'AES-256-CBC', $developerKey, 0, $iv)); $isf_password = base64_encode(openssl_encrypt('password', 'AES-256-CBC', $developerKey, 0, $iv)); Setting the price of the application in the shipment billing model
For courier applications based on ISF methods, parcels should be billed using the following API. Each parcel should be submitted, along with the net price to be added to the license fees. The price of one parcel can be given several times (max 180 days after first sending) - the system will check the last charge and charge the difference in the price of the parcel. This allows you to apply surcharges and adjustments for parcels.
Request:
POST: https://apps.idosell.com/api/application/license/setPrice/shipping
{
application_id: (int) // application id
developer: (string) // developer login
api_license: (string) //license number
shipping_id: (string) // shipping number
price: (number) // price for package
sign: (string) // communication signature
}
Response:
{
status: (enum['ok', 'error']) // status
?errors: [(string)] // list of errors
sign: (string) // communication signature
license: {
price: (number) // price for next invoice
shipping_id: (string) // shipping number
changed: (boolean) // has the price changed
currency: (string) // price currency
}
}Updated 7 months ago