Skip to main content

Library PiP for Secursus api.

Project description

Secursus Integration API

Secursus is the most powerful digital insurance for parcels, covering the most sensitive items and up to €100,000 per parcel. To integrate the insurance service in your website, we provide this php library that will allow you to automate your insurance orders.

For more information about the product, please visit our website : https://www.secursus.com/integration/

Prerequisite

To use the Secursus API, you need to create an account on our platform and activate it.

https://www.secursus.com/integration/registration.php

Installation

pip install -i secursus-api

Usage

from secursus_api import api as secursus_api

# Set your API credentials here
secursus = secursus_api.Api(
    'YOUR_API_ID',
    'YOUR_API_KEY'
)

# And call methods after
response = secursus.retrieve_parcel_order("YOUR_PARCEL_ID")

Documentation

Get the insurance amount fees

This method is used to calculate the amount of insurance fees.

More details : https://developer.secursus.com/parcels/fees

Usage

insurance_amount = secursus.get_insurance_amount(10000)

Argument

The create parcel order method can receive only one argument, the parcel value. This argument need to be an integer and represents the total value of the parcel in euro cents.

Create parcel order

A parcel object is created and the insurance credentials are returned. Once the object has been created, you have 12 hours if you want to cancel the insurance order.

More details : https://developer.secursus.com/parcels/create

Usage

parcel_order = secursus.create_parcel_order(params)

Data argument

The create parcel order method can receive an dictionary who can contains these eight arguments (six are required):

Entry Required Data type Description
parcel_value Yes Integer Total value of the order in euro cents.
first_name Yes String Customer first name.
last_name Yes String Customer last name.
email Yes String Customer email address.
full_address Yes String Customer full address.
cart_data Yes Json Details of cart on your website. No specific format is required, this information will be analyzed for any claim.
company No String Customer company name.
lang No String Language used for the insurance confirmation email sent to the customer. Two possible values: "fr" or "en". Default value: "en".

Retrieve a parcel order

This method is used to get the insurance credentials and parcel informations.

Usage

parcel_order = secursus.retrieve_parcel_order(id_parcel)

Argument

The retrieve parcel order method can receive only one argument, the parcel id. This argument need to be a string and is the insurance id generated by the createParcelOrder method.

Retrieve a history parcel report

This method is used to get the list of all parcels of the account.

Usage

parcel_order = secursus.retrieve_history_report(id_parcel)

Retrieve a current parcel report

This method is used to get the list of all parcels to due during the current month.

Usage

parcel_order = secursus.retrieve_current_report(id_parcel)

Cancel a parcel order

This method is used to cancel an insurance order that you previously sent.

Note: Once the insurance request has been created, you have 12 hours if you want to cancel the insurance order. After this period, the insurance order is considered as confirmed and can't be canceled. The insurance fees are then payable.

More details : https://developer.secursus.com/parcels/cancel

Usage

parcel_order = secursus.cancel_parcel_order(id_parcel)

Argument

The retrieve parcel order method can receive only one argument, the parcel id. This argument need to be a string and is the insurance id generated by the createParcelOrder method.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secursus-api-1.0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secursus_api-1.0.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file secursus-api-1.0.2.tar.gz.

File metadata

  • Download URL: secursus-api-1.0.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.9

File hashes

Hashes for secursus-api-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0f1c6b95d32478b734887584e98356607262a0a507843f36b7a1d73fe44416cb
MD5 b4be40d32a85501025c57fc665d6e69e
BLAKE2b-256 c120bc5be159b2aa0fc7f25359476a564acfced3c4b79109162be3f268ef69dc

See more details on using hashes here.

File details

Details for the file secursus_api-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: secursus_api-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.9

File hashes

Hashes for secursus_api-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f403b946d48833c676f7d6f8c79c3d7a5ec798301298dce9e2b6871387a93def
MD5 eb1afca52395df89060793a0c13ed52e
BLAKE2b-256 fdf29a74edff237543075c1c6851d917d6717c28f1e2b9c6750b41151ce67243

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page