NAV
shell

Introduction

Welcome to the MyPangee API.

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Authentication (Header parameters)

For using our API, you will need a few information from us :

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Pricing

Get Price Custom Equipment

Here is an example:

curl -G -X GET 'https://{URL}/api/v1/space/{SPACE_ID}/purchase/pricing' \
    --data-urlencode 'categoryId=8'  \
    --data-urlencode 'unitaryPriceInCts=100000'  \
    --data-urlencode 'unitaryCashPriceInCts=120000'  \
    --data-urlencode 'quantity=1'  \
    --data-urlencode 'equipmentType=PRODUCT'  \
    --data-urlencode 'trademark=YOURTRADEMARK'  \
    --data-urlencode 'shippingUnitaryCostInCts=3900'  \
    --data-urlencode 'shippingType=STORE'

The above command returns JSON structured like this:

{
   "CASH_IN_SINGLE_INSTALMENT":{ //type of purchase, CASH_IN_SINGLE_INSTALMENT
      "currents": [
         {
            // for rental will contain the amount of the access fee paid when creating the purchase
            "accessFee": {
               // all price are structured like this :
               "priceInCts": 0,
               "taxPriceInCts": 0,
               "taxExcludedPriceInCts": 0
            },
            // Total shipping price
            "shipping": {
               "priceInCts": 3900,
               "taxPriceInCts": 650,
               "taxExcludedPriceInCts": 3250
            },
            // Total price
            "price": {
               "priceInCts": 123900,
               "taxPriceInCts": 20650,
               "taxExcludedPriceInCts": 103250
            },
            // Included items
            "includedItems": [
               {
                  "description": "The description"
                  "frequencyInMonths": 12
                  "image": "https://media.mypangee.com/image.png "
                  "link": "https://media.mypangee.com/link.pdf"
                  "paymentMode": "OCCURRENCE"
                  "publicPriceInCts": 1234
                  "title": "Title"
               },
               ...
            ]
         }
      ],
      "minimalPriceWithDuration": {
         "accessFee": {
            "priceInCts": 0,
            "taxPriceInCts": 0,
            "taxExcludedPriceInCts": 0
         },
         "shipping": {
            "priceInCts": 3900,
            "taxPriceInCts": 650,
            "taxExcludedPriceInCts": 3250
         },
         "price": {
            "priceInCts": 123900,
            "taxPriceInCts": 20650,
            "taxExcludedPriceInCts": 103250
         },
         "includedItems": [...]
      },
      "durationsInMonth": [
         12
      ],
      "instalmentCounts": {}
   },
   "CASH_IN_SEVERAL_INSTALMENTS":{ //type of purchase, CASH_IN_SEVERAL_INSTALMENTS
      "currents": [
         {
            "accessFee": {
               "priceInCts": 0,
               "taxPriceInCts": 0,
               "taxExcludedPriceInCts": 0
            },
            "shipping": {
               "priceInCts": 3900,
               "taxPriceInCts": 650,
               "taxExcludedPriceInCts": 3250
            },
            "price": {
               "priceInCts": 123900,
               "taxPriceInCts": 20650,
               "taxExcludedPriceInCts": 103250
            },
            // Payment instalment count
            "instalmentCount": 3,
            // Customer first payment
            "firstPayment": {
               "priceInCts": 41300,
               "taxPriceInCts": 6883,
               "taxExcludedPriceInCts": 34417
            },
            // Customer other schedule payment
            "schedulePayment": {
               "priceInCts": 41300,
               "taxPriceInCts": 6883,
               "taxExcludedPriceInCts": 34417
            },
            "includedItems": [...]
         },
         {
            "accessFee": {
               "priceInCts": 0,
               "taxPriceInCts": 0,
               "taxExcludedPriceInCts": 0
            },
            "shipping": {
               "priceInCts": 3900,
               "taxPriceInCts": 650,
               "taxExcludedPriceInCts": 3250
            },
            "price": {
               "priceInCts": 123900,
               "taxPriceInCts": 20650,
               "taxExcludedPriceInCts": 103250
            },
            "instalmentCount": 4,
            "firstPayment": {
               "priceInCts": 30975,
               "taxPriceInCts": 5162,
               "taxExcludedPriceInCts": 25813
            },
            "schedulePayment": {
               "priceInCts": 30975,
               "taxPriceInCts": 5162,
               "taxExcludedPriceInCts": 25813
            },
            "includedItems": [...]
         }
      ],
      "minimalPriceWithDuration": {
         "accessFee": {
            "priceInCts": 0,
            "taxPriceInCts": 0,
            "taxExcludedPriceInCts": 0
         },
         "shipping": {
            "priceInCts": 3900,
            "taxPriceInCts": 650,
            "taxExcludedPriceInCts": 3250
         },
         "price": {
            "priceInCts": 123900,
            "taxPriceInCts": 20650,
            "taxExcludedPriceInCts": 103250
         },
         "instalmentCount": 4,
         "firstPayment": {
            "priceInCts": 30975,
            "taxPriceInCts": 5162,
            "taxExcludedPriceInCts": 25813
         },
         "schedulePayment": {
            "priceInCts": 30975,
            "taxPriceInCts": 5162,
            "taxExcludedPriceInCts": 25813
         },
         "includedItems": [...]
      },
      "durationsInMonth": [
         12
      ],
      // distinct instalment count available, only for CASH_IN_SEVERAL_INSTALMENTS, else empty
      "instalmentCounts": {
         "12": [3,4]
      }
   }
   "RENT_ ...":{ //type of purchase, can be RENT_PRODUCT_WITH_REDEMPTION, RENT_PRODUCT_WITHOUT_REDEMPTION
      "currents": [
         {
            "accessFee": {
               "priceInCts": 10090,
               "taxPriceInCts": 1682,
               "taxExcludedPriceInCts": 8408
            },
            // customer contribution, this will be paid with the first rent
            "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
            },
            // Duration in month for this price
            "durationInMonths": 12,
            // Total first monthly price (monthlyPayment + customer contribution)
            "firstMonthlyPayment": {
               "priceInCts": 23990,
               "taxPriceInCts": 3999,
               "taxExcludedPriceInCts": 19991
            },
            // Total monthly price
            "monthlyPayment": {
               "priceInCts": 13990,
               "taxPriceInCts": 2332,
               "taxExcludedPriceInCts": 11658
            },
            "includedItems": [...]
         },
         {
            "accessFee": {
               "priceInCts": 10090,
               "taxPriceInCts": 1682,
               "taxExcludedPriceInCts": 8408
            },
            "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
            },
            "durationInMonths": 24,
            "firstMonthlyPayment": {
               "priceInCts": 18090,
               "taxPriceInCts": 3015,
               "taxExcludedPriceInCts": 15075
            },
            "monthlyPayment": {
               "priceInCts": 8090,
               "taxPriceInCts": 1348,
               "taxExcludedPriceInCts": 6742
            },
            "includedItems": [...]
         },
         {
            "accessFee": {
               "priceInCts": 10090,
               "taxPriceInCts": 1682,
               "taxExcludedPriceInCts": 8408
            },
            "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
            },
            "durationInMonths": 36,
            "firstMonthlyPayment": {
               "priceInCts": 16360,
               "taxPriceInCts": 2727,
               "taxExcludedPriceInCts": 13633
            },
            "monthlyPayment": {
               "priceInCts": 6360,
               "taxPriceInCts": 1060,
               "taxExcludedPriceInCts": 5300
            },
            "includedItems": [...]
         },
         {
            "accessFee": {
               "priceInCts": 10090,
               "taxPriceInCts": 1682,
               "taxExcludedPriceInCts": 8408
            },
            "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
            },
            "durationInMonths": 48,
            "firstMonthlyPayment": {
               "priceInCts": 15030,
               "taxPriceInCts": 2505,
               "taxExcludedPriceInCts": 12525
            },
            "monthlyPayment": {
               "priceInCts": 5030,
               "taxPriceInCts": 838,
               "taxExcludedPriceInCts": 4192
            },
            "includedItems": [...]
         }
      ],
      // will be the minimal monthly price from the above nodes
      "minimalPriceWithDuration": {
         "accessFee": {
               "priceInCts": 10090,
               "taxPriceInCts": 1682,
               "taxExcludedPriceInCts": 8408
         },
         "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
         },
         "durationInMonths": 48,
         "firstMonthlyPayment": {
               "priceInCts": 15030,
               "taxPriceInCts": 2505,
               "taxExcludedPriceInCts": 12525
         },
         "monthlyPayment": {
               "priceInCts": 5030,
               "taxPriceInCts": 838,
               "taxExcludedPriceInCts": 4192
         },
         "includedItems": [...]
      },
      "durationsInMonth": [12,24,36,48],
      "instalmentCounts": {}
   }
}

This API can be used for getting the prices for an item. And can be used for building a form for choosing the kind of purchase and duration.

GET https://${URL}/api/v1/space/${SPACE_ID}/purchase/pricing

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
trademark true string The product trademark, used in emails, billing, can be used to set different leasing rates
categoryId true number The product category id will be used to choose leasing rates, see below to know how to get this value
unitaryCashPriceInCts false number Price in cts for one unit of the product. It is used for calculation of cash (CASH_IN_SEVERAL_INSTALMENTS, CASH_IN_SINGLE_INSTALMENTS)
unitaryPriceInCts true number Price in cts used for RENT. This can be lower than unitaryCashPrice in order to have nice loan
equipmentType true value Kind of item PRODUCT or ACCESSORY
quantity true number Quantity of product
personType false values NATURAL Type of customer, this might change the leasing rates. Use "NATURAL" for individual person and "COMPANY" for a professional.
shippingUnitaryCostInCts false number 0 Shipping cost in cts
shippingType false value STORE Shipping type
equipmentState false values NEW It will change the rent rates and will be displayed in documents and emails.

Get Price Equipment (external reference)

Here is an example:

curl -X GET 'https://{URL}/api/v1/space/{SPACE_ID}/purchase/pricing/externalReference/{externalReference}'

The above command returns JSON, see Get Price Response

This API can be used for getting the prices for an item. And can be used for building a form for choosing the kind of purchase and duration.

GET https://${URL}/api/v1/space/${SPACE_ID}/purchase/pricing/externalReference/{externalReference}

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
externalReference true string Your product reference, you send us when creating the catalog
equipmentState false values NEW It will change the rent rates and will be displayed in documents and emails.

Get Price Shopping Cart

Here is an example:

curl --request POST \
     --header "Content-Type: application/json" \
      https://${URL}/api/v1/space/${SPACE_ID}/purchase/pricing/shoppingcart? \
      --data  @- <<REQUEST_BODY
/* shopping cart items */
{
   "items": [
      {
         "equipmentType": "PRODUCT",
         "categoryId": "16",
         "unitaryPriceInCts": "100000",
         "unitaryCashPriceInCts": "123400",
         "quantity": "1",
         "trademark": "T",
         "shippingUnitaryCostInCts": "3900"
      },
      {
         "equipmentType": "ACCESSORY",
         "categoryExternalId" : "Mountain bike helmet",
         "unitaryPriceInCts": "5000",
         "unitaryCashPriceInCts": "6000",
         "quantity": "2",
         "trademark": "T",
         "shippingUnitaryCostInCts": "490"
      }
      ...
   ],
   "purchaseKind": "RENT_PRODUCT_WITH_REDEMPTION",
   "personType": "NATURAL"
}
REQUEST_BODY

The above command returns JSON structured like this:

{
   "CASH_IN_SINGLE_INSTALMENT": {
      "currents": [
         {
            "accessFee": {
               "priceInCts": 0,
               "taxPriceInCts": 0,
               "taxExcludedPriceInCts": 0
            },
            "shipping": {
               "priceInCts": 4880,
               "taxPriceInCts": 813,
               "taxExcludedPriceInCts": 4067
            },
            "price": {
               "priceInCts": 149345,
               "taxPriceInCts": 2813,
               "taxExcludedPriceInCts": 146532
            },
            // Included items
            "includedItems": [
               {
                  "description": "The description"
                  "frequencyInMonths": 12
                  "image": "https://media.mypangee.com/image.png "
                  "link": "https://media.mypangee.com/link.pdf"
                  "paymentMode": "OCCURRENCE"
                  "publicPriceInCts": 1234
                  "title": "Title"
               },
               ...
            ]
         }
      ],
      "minimalPriceWithDuration": {
         "accessFee": {
               "priceInCts": 0,
               "taxPriceInCts": 0,
               "taxExcludedPriceInCts": 0
         },
         "shipping": {
               "priceInCts": 4880,
               "taxPriceInCts": 813,
               "taxExcludedPriceInCts": 4067
         },
         "price": {
               "priceInCts": 149345,
               "taxPriceInCts": 2813,
               "taxExcludedPriceInCts": 146532
         },
         "includedItems": [...]
      },
      "durationsInMonth": [
         12
      ],
      "instalmentCounts": {}
   },
   "RENT_PRODUCT_WITH_REDEMPTION": {
      "currents": [
         {
            "accessFee": {
               "priceInCts": 3090,
               "taxPriceInCts": 515,
               "taxExcludedPriceInCts": 2575
            },
            "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
            },
            "durationInMonths": 12,
            "firstMonthlyPayment": {
               "priceInCts": 16560,
               "taxPriceInCts": 2761,
               "taxExcludedPriceInCts": 13799
            },
            "monthlyPayment": {
               "priceInCts": 6560,
               "taxPriceInCts": 1094,
               "taxExcludedPriceInCts": 5466
            },
            "includedItems": [...]
         },
         {
            "accessFee": {
               "priceInCts": 3090,
               "taxPriceInCts": 515,
               "taxExcludedPriceInCts": 2575
            },
            "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
            },
            "durationInMonths": 24,
            "firstMonthlyPayment": {
               "priceInCts": 14360,
               "taxPriceInCts": 2394,
               "taxExcludedPriceInCts": 11966
            },
            "monthlyPayment": {
               "priceInCts": 4360,
               "taxPriceInCts": 727,
               "taxExcludedPriceInCts": 3633
            },
            "includedItems": [...]
         },
         {
            "accessFee": {
               "priceInCts": 3090,
               "taxPriceInCts": 515,
               "taxExcludedPriceInCts": 2575
            },
            "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
            },
            "durationInMonths": 36,
            "firstMonthlyPayment": {
               "priceInCts": 13540,
               "taxPriceInCts": 2257,
               "taxExcludedPriceInCts": 11283
            },
            "monthlyPayment": {
               "priceInCts": 3540,
               "taxPriceInCts": 590,
               "taxExcludedPriceInCts": 2950
            },
            "includedItems": [...]
         }
      ],
      "minimalPriceWithDuration": {
         "accessFee": {
               "priceInCts": 3090,
               "taxPriceInCts": 515,
               "taxExcludedPriceInCts": 2575
         },
         "customerContribution": {
               "priceInCts": 10000,
               "taxPriceInCts": 1667,
               "taxExcludedPriceInCts": 8333
         },
         "durationInMonths": 36,
         "firstMonthlyPayment": {
               "priceInCts": 13540,
               "taxPriceInCts": 2257,
               "taxExcludedPriceInCts": 11283
         },
         "monthlyPayment": {
               "priceInCts": 3540,
               "taxPriceInCts": 590,
               "taxExcludedPriceInCts": 2950
         },
         "includedItems": [...]
      },
      "durationsInMonth": [
         12,
         24,
         36
      ],
      "instalmentCounts": {}
   }
}

This API can be used for getting the prices for multiple items.

GET https://${URL}/api/v1/space/${SPACE_ID}/purchase/pricing/shoppingcart

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by MyPangee team
SPACE_ID true number Your marketplace ID, given by MyPangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Shopping cart object

Parameter Required Type Default Description
items true array[Item] The list of shopping cart items
purchaseKind false values The purchase kind, only if you have this information on your web site.
personType false values NATURAL Type of customer, this might change the leasing rates. Use "NATURAL" for individual person and "COMPANY" for a professional.

Item object

Parameter Required Type Default Description
categoryId true number Category ID, look values for details
categoryExternalId true string the equipment category name as provided by you to Pangee. Either the categoryId or the categoryExternalId should be provided but not both
equipmentState false values NEW It will change the rent rates and will be displayed in documents and emails.
insurances false string[] List of insurances codes, only for product item.
equipmentType true values Kind of item PRODUCT or ACCESSORY.
unitaryPriceInCts true number Price in cts of one unit of the product with taxes. This price is used for calculation of loan for rent and can be lower than cashPriceInCts in order to have a nice loan.
unitaryCashPriceInCts true number Used for CASH calculation (CASH_IN_SEVERAL_INSTALMENTS, CASH_IN_SINGLE_INSTALMENTS). This can be higher than priceInCts in order to have nice loan.
quantity true number 1 Quantity of product that will be added to the shopping cart.
trademark true string The product trademark, it be displayed in the shopping cart, in the documents and on the emails.
services false string[] List of services codes, only for product item.
includedServices false string[] List of included services codes, not removable services, only for product item.
shippingUnitaryCostInCts true number Shipping cost by product unit with taxes.
shippingType true values The shipping delivery type.

Shopping cart

Add Shopping Cart

curl --request POST \
     --header "Content-Type: application/json" \
      https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/addShoppingCart?
      target=${target}&
      --data  @- <<REQUEST_BODY
/* shopping cart items */
{
  "items" : [
    {
      /* the equipment category id ([values](#categories)) */
      "categoryId" : 123,
      /*
      the equipment category name as provided to Pangee.
      (either the categoryId or the categoryExternalId should be provided but not both)
      */
      "categoryExternalId" : "Mountain bike",
      /* the calculated checksum */
      "checksum" : "ABCD...",
      /* the equipment description */
      "description" : "description ...",
      /* the equipment state ([values](#equipmnet-state)) */
      "equipmentState" : "NEW",
      /* the equipment type ([values](#equipmnet-type)) */
      "equipmentType" : "PRODUCT",
      /* the equipment image */
      "image" : "https://logo.png",
      /* the equipment insurance code (see with Pangee) */
      "insurances" : [],
      /* the equipment link */
      "link" : "https://link",
      /* the equipment model */
      "model" : "MODEL",
      /* the equipment price in cts for RENT*/
      "priceInCts" : 123400,
      /* the equipment cash price in cts */
      "cashPriceInCts" : 145600,
      /* the equipment quantity */
      "quantity" : 1,
      /* the equipment reference */
      "reference" : "REF_123",
      /* the external reference (id, ean...) */
      "externalReference" : "EAN",
      /* the shipping delivery time in days */
      "shippingDeliveryTimeInDays" : 7,
      /* the shipping type */
      "shippingType" : "HOME_DELIVERY",
      /* the shipping unitary cost in cts */
      "shippingUnitaryCostInCts" : 3000,
      /* the equipment stock available (-1 is unlimited value) */
      "stock" : -1,
      /* the equipment trademark */
      "trademark" : "TRADEMARK"
    },
    ...
  ],
  /* the customer informations */
  "customer": {
        "lastName": "DUPONT",
        "firstName": "Michel",
        "birthDate": "1990-01-31",
        "deliveryPostalAddress":{
            "streetAddress": "15 rue de ...",
            "additionalStreetAddress": "",
            "postalCode": "12345",
            "locality": "TOULOUSE",
            "countryCode": "FR",
            "name": "Maison principale"
        },
        "billingPostalAddress": {
            "streetAddress": "12 rue ...",
            "additionalStreetAddress": "",
            "postalCode": "78945",
            "locality": "PARIS",
            "countryCode": "FR",
            "name": "Lieu de travail"
        },
        "email": "email@mypangee.com",
        "personType": "COMPANY",
        "companyName": "PANGEE",
        "companyIdentifier": "123456789",
        "customerCivility": "MR"
    },
    /* the purchase external ID */
    "purchaseExternalId": "1",
    /* The purchase kind */
    "purchaseKind": "RENT_PRODUCT_WITH_REDEMPTION",
    /* The rental duration */
    "durationInMonths": "24"
    /* The web target url on marketplace */
    "target": "SHOPPING_CART"
}
REQUEST_BODY



> Here is the php code for generating the checksum

```shell
$data = [
    'categoryId' => 8,
    'equipmentState' => 'NEW',
    'equipmentType' => 'PRODUCT',
    'image' => 'https://bigcorp.com/product.jpg',
    'link' => 'https://bigcorp.com/product.html',
    'model' => 'NICE PRODUCT',
    'priceInCts' => 437700,
    'cashPriceInCts' => 450700,
    'reference' => 'REFERENCE-123456',
    'shippingDeliveryTimeInDays' => 7,
    'shippingType' => 'HOME_DELIVERY',
    'shippingUnitaryCostInCts' => 3900,
    'trademark' => 'BIGCORP'
];

$vars = [
    $data['categoryId'],// or $data['categoryExternalId']
    $data['equipmentState'],
    $data['equipmentType'],
    $data['image'],
    $data['link'],
    $data['model'],
    $data['priceInCts'],
    $data['cashPriceInCts'],
    $data['reference'],
    $data['shippingDeliveryTimeInDays'],
    $data['shippingType'],
    $data['shippingUnitaryCostInCts'],
    $data['trademark']
];

$checksum = strtoupper(hash_hmac('sha512', join('&', $vars), pack("H*", "TOKEN")));

> Here is the javascript code for generating the checksum

var data = {
    categoryId: 8,
    equipmentState: 'NEW',
    equipmentType: 'PRODUCT',
    image: 'https://bigcorp.com/product.jpg',
    link: 'https://bigcorp.com/product.html',
    model: 'NICE PRODUCT',
    priceInCts: 437700,
    cashPriceInCts: 450700,
    reference: 'REFERENCE-123456',
    shippingDeliveryTimeInDays: 7,
    shippingType: 'HOME_DELIVERY',
    shippingUnitaryCostInCts: 3900,
    trademark: 'BIGCORP'
};


var vars = [
    data['categoryId'],
    data['equipmentState'],
    data['equipmentType'],
    data['image'],
    data['link'],
    data['model'],
    data['priceInCts'],
    data['cashPriceInCts'],
    data['reference'],
    data['shippingDeliveryTimeInDays'],
    data['shippingType'],
    data['shippingUnitaryCostInCts'],
    data['trademark']
];

var token = 'TOKEN';
var buffer = Buffer.from(token, "hex");
var hmac = crypto.createHmac('sha512', buffer);
var data = hmac.update(vars.join('&'));
var checksum = data.digest("hex").toUpperCase();

Call options

If you call this API with media type

With this API you can build a button that will redirect the user to our marketplace with a shopping cart (products, accessories, ...) from your catalog.

You have to build your button like this :

You can find an example here.

POST https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/addShoppingCart

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by MyPangee team
SPACE_ID true number Your marketplace ID, given by MyPangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Shopping cart object

Parameter Required Type Default Description
items true Item[] The list of shopping cart items
customer false Customer The customer informations
purchaseExternalId false string The purchase external id
purchaseKind false values The purchase kind, only if you have this information on your web site.
durationInMonths false number The rental duration, only if you have this information on your web site.
target false values EQUIPMENT_COMPLEMENT The web target url on marketplace

Item object

Parameter Required Type Default Description
categoryId true number Category ID, look values for details
categoryExternalId true string the equipment category id as provided by you to Pangee. Either the categoryId or the categoryExternalId should be provided but not both
checksum true string The checksum you calculated server side using your API key (see php sample for calculating the checksum) (generator)
description false string Description of the equipment.
equipmentState false values NEW It will change the rent rates and will be displayed in documents and emails.
equipmentType true values It will change the rent rates and will be displayed in documents and emails.
image true string This image will be displayed in the shopping cart.
link true string Link for getting informations about the product, it will be added to the shopping cart.
model true string Name of the product, it be displayed in the shopping cart, in the documents and on the emails (max 128 characters).
priceInCts true number Price in cts of one unit of the product with taxes. This price is used for calculation of loan for rent and can be lower than cashPriceInCts in order to have a nice loan.
cashPriceInCts true number Used for CASH calculation (CASH_IN_SEVERAL_INSTALMENTS, CASH_IN_SINGLE_INSTALMENTS). This can be higher than priceInCts in order to have nice loan.
quantity true number 1 Quantity of product that will be added to the shopping cart.
reference true string The product reference, it will be displayed in the documents and on the emails. Can be used by you for adding your product identifier.
externalReference false string The external reference (id, ean...)
shippingDeliveryTimeInDays true number Shipping time in days.
shippingType true values The shipping delivery type.
shippingUnitaryCostInCts true number Shipping cost by product unit with taxes.
stock false number Product stock, this will limit the maximum quantity the customer can choose. Use -1 for unlimited. Default -1.
trademark true string The product trademark, it be displayed in the shopping cart, in the documents and on the emails (max 128 characters).
insurances false string[] Insurance code for the product, list of available insurances.
services false string[] List of services codes, only for product item. list of available services
includedServices false string[] List of included services codes, not removable services, only for product item. list of available services

Customer object

Only if you get the customer information in your website. This informations is also requested by mypangee.

Parameter Required Type Default Description
lastName false string The customer last name
firstName false string The customer first name
birthDate false string (yyyy-mm-dd) The customer birth date
deliveryPostalAddress false address The customer delivery postal address
billingPostalAddress false address The customer billing postal address
telephoneNumber false string The customer telephone number (without country prefix)
countryTelephoneNumber false string{2} The customer telephone number country (ex: FR)
customerCivility false values The customer civility

Address object

Parameter Required Type Default Description
streetAddress false string The street address information
additionalStreetAddress false string The additional street address information
postalCode false string (yyyy-mm-dd) The postal code address information
locality false string (UPPER CASE) The locality address information
countryCode false string{2} The country code address information
name false string The name address information

Add Custom Product

curl https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/add?
      categoryId=${categoryId}&
      checksum=${checksum}&
      cleanShoppingCart=${cleanShoppingCart}&
      description=${description}&
      equipmentState=${equipmentState}&
      equipmentType=${equipmentType}&
      image=${image}&
      insurances=${insurance}&
      link=${link}&
      model=${model}&
      priceInCts=${priceInCts}&
      cashPriceInCts=${cashPriceInCts}&
      quantity=${quantity}&
      reference=${reference}&
      shippingDeliveryTimeInDays=${shippingDeliveryTimeInDays}&
      shippingType=${shippingType}&
      shippingUnitaryCostInCts=${shippingUnitaryCostInCts}&
      stock=${stock}&
      target=${target}&
      trademark=${trademark}
      --request GET

See Add Shopping Cart for the checksum calculation

With this API you can build a button that will redirect the user to our marketplace with a product from your catalog added to his shopping cart.

You have to build your button like this :

You can find an example here.

GET https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/add

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by MyPangee team
SPACE_ID true number Your marketplace ID, given by MyPangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
categoryId true number Category ID, look values for details
cleanShoppingCart false boolean false Clean the shopping cart before adding the new product
checksum true string The checksum you calculated server side using your API key (see php sample for calculating the checksum) (generator)
description false string Description of the equipment.
equipmentState false values NEW It will change the rent rates and will be displayed in documents and emails.
equipmentType true values It will change the rent rates and will be displayed in documents and emails.
image true string This image will be displayed in the shopping cart.
insurances false string[] Insurance code for the product, if applyable, list of available insurances.
link true string Link for getting informations about the product, it will be added to the shopping cart.
model true string Name of the product, it be displayed in the shopping cart, in the documents and on the emails (max 128 characters).
priceInCts true number Price in cts of one unit of the product with taxes. This price is used for calculation of loan for rent and can be lower than cashPriceInCts in order to have a nice loan.
cashPriceInCts true number Used for CASH calculation (CASH_IN_SEVERAL_INSTALMENTS, CASH_IN_SINGLE_INSTALMENTS). This can be higher than priceInCts in order to have nice loan.
quantity true number 1 Quantity of product that will be added to the shopping cart.
reference true string The product reference, it will be displayed in the documents and on the emails. Can be used by you for adding your product identifier.
services false string[] List of services codes, only for product item. list of available services.
includedServices false string[] List of included services codes, not removable services, only for product item. list of available services.
shippingType true values The shipping delivery type.
shippingUnitaryCostInCts true number Shipping cost by product unit with taxes.
stock false number Product stock, this will limit the maximum quantity the customer can choose. Use -1 for unlimited. Default -1.
target false values EQUIPMENT_COMPLEMENT The target page on the marketplace
trademark true string The product trademark, it be displayed in the shopping cart, in the documents and on the emails (max 128 characters).

Add Product By External Reference

 https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/addEquipment/externalReference?
     cleanShoppingCart=${cleanShoppingCart}&
     equipmentState=${equipmentState}&
     insurances=${insurance}&
     quantity=${quantity}&
     reference=${reference}&
     services=${services}&
     target=${target}}
     --request GET

With this API you can add product to shopping cart with the reference of your product.

Of course, you have to communicate us those references that we can save your them in our DB.

GET https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/addEquipment/externalReference

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
cleanShoppingCart false boolean false Clean the shopping cart before adding the new product
equipmentState false values NEW It will change the rent rates and will be displayed in documents and emails.
insurances false string[] Insurance code for the product, if applyable, list of available insurances
quantity true number 1 Quantity of product that will be added to the shopping cart.
reference true string Your product reference.
services false string[] List of services codes, only for product item. list of available services.
includedServices false string[] List of included services codes, not removable services, only for product item. list of available services.
target false values EQUIPMENT_COMPLEMENT The target page on the marketplace

Add Product By mypangee Reference

 https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/addEquipment/internalReference?
      cleanShoppingCart=${cleanShoppingCart}&
      equipmentState=${equipmentState}&
      insurances=${insurance}&
      quantity=${quantity}&
      reference=${reference}&
        services=${services}&
      target=${target}}
    --request GET

With this API you can add product to shopping cart with the mypangee reference product.

GET https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/addEquipment/internalReference

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Specific parameters

Parameter Required Type Default Description
cleanShoppingCart false boolean false Clean the shopping cart before adding the new product
equipmentState false values NEW It will change the rent rates and will be displayed in documents and emails.
insurances false string[] Insurance code for the product, if applyable, list of available insurances.
quantity true number 1 Quantity of product that will be added to the shopping cart.
reference true string Your product reference.
services false string[] Services codes list, list of available services.
target false values EQUIPMENT_COMPLEMENT The target page on the marketplace

Purchase

Purchase - Information

You need to do this kind of request :

curl  https://${URL}/api/v1/purchase/${PURCHASE_ID} \
      --request GET  \
      --header 'X-API-Token: ${TOKEN}'

or with your own external ID (you must call this at least once with our id so we know yours)

curl  https://${URL}/api/v1/purchase/external/${EXTERNAL_ID} \
      --request GET  \
      --header 'X-API-Token: ${TOKEN}'

You will receive this kind of response

{
  // MyPangee purchase ID
  "id": "1321546",
  // Purchase kind, see below for the different purchase kinds
  "kind": "RENT_PRODUCT_WITH_REDEMPTION",
  // Purchase status, see below for the different purchase status
  "status": "WAITING_FOR_PAYMENT",
  // Purchase creation time UTC
  "dateCreation": "2018-01-01T20:00:00Z",
  // Purchase update time UTC
  "dateLastUpdate": "2018-01-10T21:10:00Z",
  // Only rental. UTC date at which the rental start (delivery date)
  "dateStart": "2018-01-01T20:00:00Z",
  // Only rental.UTC last day of rental
  "dateEnd": "2021-01-01T20:00:00Z",
  // Rental duraiton in months
  "durationInMonths": 48,
  // Retailer country
  "country": "FR",
  // Purchase currency
  "currency": "EUR",
  // The retailer purchase ID
  "externalId": "AAAA",
  // Purchase items - return detailed information if allowed
  "items": [
    {
      // purchase item id
      "id": "9879879",
      // product reference
      "reference": "DSMLKDSK",
      // your reference we setup in our system
      "externalReference": "AZERTY",
      // Unit price the customer paid for the product
      "sellingPrice": {
        // all price are structured like this :
        "priceInCts": 52190, // price paid by the customer
        "taxPriceInCts": 8698, // tax part in this price
        "taxExcludedPriceInCts": 43492 // price without taxes
      },
      // Equipment name
      "name": "Blue Beautiful Bike ",
      // Equipment model
      "model": "Model",
      // Equipment description
      "description": "The description",
      // Quantity of product
      "quantity": 3,
      // Purchase item kind (see below for all the product kind)
      "kind": "PRODUCT",
      // Product serial numbers, known only after delivery
      "serialNumber": "897987987"
    }
  ],
  // informations about the customer
  "customer": {
    // his email address
    "email": "test@mypangee.com",
    // Last name
    "lastName": "DUPONT",
    // First name
    "firstName": "Jean",
    // Phone number with country prefix
    "phoneNumber": "+33 5 61 84 79 96",
    // Type of customer, NATURAL or COMPANY
    "type": "NATURAL",
    // the customer delivery address
    "billingPostalAddress": {
      "streetAddress": "2 rue Lapeyrouse",
      "additionalStreetAddress": "",
      "postalCode": "31300",
      "locality": "TOULOUSE",
      "countryCode": "FR",
      "fullStreetAddress": "2 rue Lapeyrouse",
      "fullAddress": "2 rue Lapeyrouse 31300 TOULOUSE",
      "name": "Nom Entreprise"
    },
    "deliveryPostalAddress": {
      //same fields as the billingPostalAddress
    }
  },
  // details about the company where the customer ished to be delviered in case of a pickup delivery
  "deliveryTo": {
    //the company address, same fields as the adress in customer
    "address": {},
    //the company name
    "name": "Pickup place",
    // the company contact email
    "email": "bigcorp@bigcorp.com",
    // the company contact phone number
    "phoneNumber": "+33 5 61 84 79 96",
    //the company external id you can provide us
    "externalReference": "AZ123"
  },
  // informations about a purchase pricing
  "pricing": {
    // Customer contribution price
    "customerContributionPriceInCts": {
      "priceInCts": 0, // price in cents
      "taxPriceInCts": 0, // price tax in cents
      "taxExcludedPriceInCts": 0 // price without tax in cents
    },
    // Redemption price
    "redemptionPriceInCts": {
      "priceInCts": 0, // price in cents
      "taxPriceInCts": 0, // price tax in cents
      "taxExcludedPriceInCts": 0 // price without tax in cents
    },
    // Total customer monthly price
    "monthlyPriceInCts": {
      "priceInCts": 0, // price in cents
      "taxPriceInCts": 0, // price tax in cents
      "taxExcludedPriceInCts": 0 // price without tax in cents
    }
  },
  "url": [
    {
      // the url for updating some information about this purchase
      "rel": "update",
      "url": "https://..."
    }
  ],
  // billings related to the caller
  "billings": [
    {
      // the billing source
      "source": {
        "address": {
          //same fields as the billingPostalAddress
        },
        "name": "PANGEE - PLATEFORME",
        "externalReference": "",
        "email": "test@mypangee.com",
        "phoneNumber": "+33 (0)1 22 33 44 66",
        "identifier": "SIRET"
      },
      // the billing destination
      "destination": {
        "address": {
          //same fields as the billingPostalAddress
        },
        "name": "ENTREPRISE",
        "externalReference": "",
        "email": "bigcorp@bigcorp.com",
        "phoneNumber": "+33 (0)1 22 33 44 66",
        "identifier": "SIRET"
      },
      // The billing amount, in cts
      "price": {
        "priceInCts": 120000,
        "taxPriceInCts": 20000,
        "taxExcludedPriceInCts": 100000
      },
      "qualifier": "PAYMENT"
    }
  ]
}

This API returns all the informations about a given purchase.

Your are authenticated by your TOKEN.

GET https://${URL}/api/v1/purchase/${PURCHASE_ID} or GET https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
PURCHASE_ID false number The MyPangee purchase identifier
EXTERNAL_ID false number The external purchase identifier

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Purchase - List by email

You need to do this kind of request :

curl  https://${URL}/api/v1/purchase/customer?
      email=${email}
      --request GET  \
      --header 'X-API-Token: ${TOKEN}'

You will receive this kind of response

[
  {
    // MyPangee purchase ID
    "id": "1321546",
    // Purchase kind, see below for the different purchase kinds
    "kind": "RENT_PRODUCT_WITH_REDEMPTION",
    // Purchase status, see below for the different purchase status
    "status": "WAITING_FOR_PAYMENT",
    // Purchase creation time UTC
    "dateCreation": "2018-01-01T20:00:00Z",
    // Purchase update time UTC
    "dateLastUpdate": "2018-01-10T21:10:00Z",
    // Only rental. UTC date at which the rental start (delivery date)
    "dateStart": "2018-01-01T20:00:00Z",
    // Only rental.UTC last day of rental
    "dateEnd": "2021-01-01T20:00:00Z",
    // Rental duraiton in months
    "durationInMonths": 48,
    // Retailer country
    "country": "FR",
    // Purchase currency
    "currency": "EUR",
    // The retailer purchase ID
    "externalId": "AAAA",
    // Purchase items - return detailed information if allowed
    "items": [
      {
        // purchase item id
        "id": "9879879",
        // product reference
        "reference": "DSMLKDSK",
        // your reference we setup in our system
        "externalReference": "AZERTY",
        // Unit price the customer paid for the product
        "sellingPrice": {
          // all price are structured like this :
          "priceInCts": 52190, // price paid by the customer
          "taxPriceInCts": 8698, // tax part in this price
          "taxExcludedPriceInCts": 43492 // price without taxes
        },
        // Equipment name
        "name": "Blue Beautiful Bike ",
        // Equipment model
        "model": "Model",
        // Equipment description
        "description": "The description",
        // Quantity of product
        "quantity": 3,
        // Purchase item kind (see below for all the product kind)
        "kind": "PRODUCT",
        // Product serial numbers, known only after delivery
        "serialNumber": "897987987"
      }
    ],
    // informations about the customer
    "customer": {
      // his email address
      "email": "test@mypangee.com",
      // Last name
      "lastName": "DUPONT",
      // First name
      "firstName": "Jean",
      // Phone number with country prefix
      "phoneNumber": "+33 5 61 84 79 96",
      // Type of customer
      "type": "NATURAL",
      // the customer delivery address
      "billingPostalAddress": {
        "streetAddress": "2 rue Lapeyrouse",
        "additionalStreetAddress": "",
        "postalCode": "31300",
        "locality": "TOULOUSE",
        "countryCode": "FR",
        "fullStreetAddress": "2 rue Lapeyrouse",
        "fullAddress": "2 rue Lapeyrouse 31300 TOULOUSE",
        "name": "Nom Entreprise"
      },
      "deliveryPostalAddress": {
        //same fields as the billingPostalAddress
      }
    },
    // details about the company where the customer ished to be delviered in case of a pickup delivery
    "deliveryTo": {
      //the company address, same fields as the adress in customer
      "address": {},
      //the company name
      "name": "Pickup place",
      // the company contact email
      "email": "bigcorp@bigcorp.com",
      // the company contact phone number
      "phoneNumber": "+33 5 61 84 79 96",
      //the company external id you can provide us
      "externalReference": "AZ123"
    },
    // informations about a purchase pricing
    "pricing": {
      // Customer contribution price
      "customerContributionPriceInCts": {
        "priceInCts": 0, // price in cents
        "taxPriceInCts": 0, // price tax in cents
        "taxExcludedPriceInCts": 0 // price without tax in cents
      },
      // Redemption price
      "redemptionPriceInCts": {
        "priceInCts": 0, // price in cents
        "taxPriceInCts": 0, // price tax in cents
        "taxExcludedPriceInCts": 0 // price without tax in cents
      },
      // Total customer monthly price
      "monthlyPriceInCts": {
        "priceInCts": 0, // price in cents
        "taxPriceInCts": 0, // price tax in cents
        "taxExcludedPriceInCts": 0 // price without tax in cents
      }
    },
    "url": [
      {
        // the url for updating some information about this purchase
        "rel": "update",
        "url": "https://..."
      }
    ],
    // billings related to the caller
    "billings": [
      {
        // the billing source
        "source": {
          "address": {
            //same fields as the billingPostalAddress
          },
          "name": "PANGEE - PLATEFORME",
          "externalReference": "",
          "email": "test@mypangee.com",
          "phoneNumber": "+33 (0)1 22 33 44 66",
          "identifier": "SIRET"
        },
        // the billing destination
        "destination": {
          "address": {
            //same fields as the billingPostalAddress
          },
          "name": "ENTREPRISE",
          "externalReference": "",
          "email": "bigcorp@bigcorp.com",
          "phoneNumber": "+33 (0)1 22 33 44 66",
          "identifier": "SIRET"
        },
        // The billing amount, in cts
        "price": {
          "priceInCts": 120000,
          "taxPriceInCts": 20000,
          "taxExcludedPriceInCts": 100000
        },
        "qualifier": "PAYMENT"
      }
    ]
  }
]

This API returns all the informations about purchases which match with customer email.

Your are authenticated by your TOKEN.

GET https://${URL}/api/v1/purchase/customer

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
email true string The customer email

Purchase - List

You need to do this kind of request :

curl  https://${URL}/api/v1/purchase?
      spaceId=${spaceId}&
      status=${status}&
      dateCreationStart=${dateCreationStart}&
      dateCreationEnd=${dateCreationEnd}&
      deliveryCompanyExternalReference=${deliveryCompanyExternalReference}
      --request GET  \
      --header "X-API-Token: ${TOKEN}"

You will receive this kind of response

[
  {
    "id": "12311", //MyPangee purchase ID
    // purchase status, you can look below for the
    // status details
    "status": "WAITING_FOR_PAYMENT",
      // Purchase creation time UTC
    "dateCreation": "2018-01-01T20:00:00Z",
    // Purchase update time UTC
    "dateLastUpdate": "2018-01-10T21:10:00Z",
    // the API url you can call to get more informations
    // about this purchase
    "url": [
        {
          // With rel=information this is URL for getting the
          // purchase items , customer details ....
          "rel" : "information",
          "url" : "https://..."
        },
        {
          // With rel=update this is the URL for updating a
          // purchase (external id, serial numbers)
          "rel" : "update",
          "url" : "https://..."
        }
        //more url will be added as we add API
    ],
    // Your purchase ID you sent us using the
    // purchase update api
    "externalId": "eazazeaze"
  },
  ...
]

This API returns all purchases for a space.

Your are authenticated by your TOKEN.

GET https://${URL}/api/v1/purchase

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
spaceId true number Your marketplace ID, given by MyPangee team
status false string Purchase Status, look values for details
dateCreationStart false string The start creation date filter, format YYYY-MM-DD
dateCreationEnd false string The end creation date filter, format YYYY-MM-DD
deliveryCompanyExternalReference false string The delivery conpany external reference

Purchase - Update

You need to do this kind of request :

curl --request POST \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/${PURCHASE_ID} \
    --data  @- <<REQUEST_BODY
{
  /* your shopping cart item */
  "externalId" :"AAAA",
  "items": [
    {

      /* the purchase item id */
      "id":"7548",
      /* your own product reference */
      "externalReference" : "YYYY",
      /* your purchase item serial number, used in contract. Only for products. */
      "serialNumber":"AAAAA"
    }
  ]
}
REQUEST_BODY

This API can be used for updating some fields in a purchase. Only the following information can be updated yet :

For identifying a purchase item, you have to use our id or your reference.

Only sent information are updated: if you do not send external id or serialNumber for a given item, it will not be updated. However, sending an empty string will save an empty string.

No results but the HTTP status code are returned by this API .

Your are authenticated by your TOKEN.

POST https://${URL}/api/v1/purchase/${PURCHASE_ID}

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
PURCHASE_ID false number The MyPangee purchase identifier

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Purchase - Add message

You need to do this kind of request :

curl --request POST \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/${PURCHASE_ID}/comment?message={text} \

This API allows you to add information message on purchase. This message is visble on back-office on history tab. The customer not see this message, is only for the administrator.

Your are authenticated by your TOKEN.

POST https://${URL}/api/v1/purchase/${PURCHASE_ID}/comment

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
PURCHASE_ID true number The MyPangee purchase identifier

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
message true string The comment message

Purchase - Delivery tracking url

You need to do this kind of request :

curl --request POST \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/${PURCHASE_ID}/addDeliveryTrackingUrl?deliveryTrackingUrl={text} \

or or with your own external ID

curl --request POST \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/addDeliveryTrackingUrl?deliveryTrackingUrl={text} \

This API allows you to add delivery tracking url on purchase with purchase Id or external Id. You can update the delivery tracking url by sending this request again.

Your are authenticated by your TOKEN.

POST https://${URL}/api/v1/purchase/${PURCHASE_ID}/addDeliveryTRackingUrl or POST https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/addDeliveryTRackingUrl

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
PURCHASE_ID true number The MyPangee purchase identifier
EXTERNAL_ID false number The external purchase identifier

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
deliveryTrackingUrl true string The deliveryTrackingUrl

Purchase - Deliver

You need to do this kind of request :

curl --request POST \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/${PURCHASE_ID}/deliver \
    --data  @- <<REQUEST_BODY
{
  /* Delivery date respecting the pattern "yyyy-MM-dd" */
  "deliveryDate": "date",
  /* List of purchase detail item */
  "items": [
    {
        "quantity": 2,
        "id": 123456, /* Item id or your externalReference id */
        "serialNumbers": [
            "serial1",
            "serial2"
        ]
    },
    {
        "quantity": 1,
        "externalReference": "987654",
        "serialNumbers": [
            "serial"
        ]
    }
  ]
}
REQUEST_BODY

or or with your own external ID

curl --request POST \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/deliver \
    --data  @- <<REQUEST_BODY
{
  /* Delivery date respecting the pattern "yyyy-MM-dd" */
  "deliveryDate": "date",
  /* List of purchase detail item */
  "items": [
    {
        "quantity": 2,
        "id": 123456, /* Item id or your externalReference id */
        "serialNumbers": [
            "serial1",
            "serial2"
        ]
    },
    {
        "quantity": 1,
        "externalReference": "987654",
        "serialNumbers": [
            "serial"
        ]
    }
  ]
}
REQUEST_BODY

This API allow you to declare that all purchase items are delivered to the customer. important: you must send all the purchase products with one request.

Your are authenticated by your TOKEN.

POST https://${URL}/api/v1/purchase/${PURCHASE_ID}/deliver or POST https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/deliver

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
PURCHASE_ID true number The MyPangee purchase identifier
EXTERNAL_ID false number The external purchase identifier

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Deliver object

Parameter Required Type Default Description
deliveryDate true string The deliveryDate
items true array[Item] The list of items

Deliver item object

Parameter Required Type Default Description
quantity true number The quantity
id true number The identifier
externalReference false string Your external reference. Either the identifier or the externalReference should be provided but not both
serialNumbers true array[Serial] The list of serial (depends on item quantity)

Deliver item serial

Parameter Required Type Default Description
serial true string The serial

Purchase - Send invoice

You need to do this kind of request:

curl --request POST \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/${PURCHASE_ID}/sendRetailerInvoice?invoiceId={text} \
    --data "attachedFile=@/path/to/invoicefilename"

or or with your own external ID

curl --request POST \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/sendRetailerInvoice?invoiceId={text} \
    --data "attachedFile=@/path/to/invoicefilename"

This API allows you to attach an invoice to a purchase with purchase Id or external Id.

POST https://${URL}/api/v1/purchase/${PURCHASE_ID}/sendRetailerInvoice or POST https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/sendRetailerInvoice

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
PURCHASE_ID true number The MyPangee purchase identifier
EXTERNAL_ID false number The external purchase identifier

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
invoiceId true string The invoiceId

Purchase - Web Hook

Our server will execute this kind of command :

curl https://${WEBHOOK_URL} \
      --request POST \
      --header "Accept: application/json" \
      --data @- << EOF
      {
        "id": "12311", //MyPangee purchase ID
        // purchase status, you can look below for the
        // status details
        "status": "WAITING_FOR_PAYMENT",
          // Purchase creation time UTC
        "dateCreation": "2018-01-01T20:00:00Z",
        // Purchase update time UTC
        "dateLastUpdate": "2018-01-10T21:10:00Z",
        // the API url you can call to get more informations
        // about this purchase
        "url": [
            {
              // With rel=information
              //this is URL for getting the purchase items , customer details ....
              "rel" : "information",
              "url" : "https://..."
            },
            {
              // With rel=informationWithExternalId
              // this is URL for getting the purchase items , customer details .... with externalId
              "rel" : "informationWithExternalId",
              "url" : "https://..."
            },
            {
              // With rel=update
              // this is the URL for updating a purchase (external id, serial numbers)
              "rel" : "update",
              "url" : "https://..."
            },
            {
              // With rel=customer
              // this is url for the customer account space
              "rel" : "customer",
              "url" : "https://..."
            }
            //more url will be added as we add API
        ],
        // Your purchase ID you sent us using the
        // purchase update api
        "externalId": "eazazeaze"
      }
      EOF

We can setup a webhook for your marketplace. This webhook will be called everytime something is done on one of your purchase, you will then have to call the purchase information API for getting details about the said purchase.

No retry policy are implemented if the call fails.

Product - Catalog

Redirect by External reference

curl https://${URL}/api/v1/space/${SPACE_ID}/equipment/externalReference/${REFERENCE}
      --request GET

With this API you can redirect user from your site to mypangee martketplace with the reference of your product.

Of course, you have to communicate us those references that we can save your them in our DB.

GET https://${URL}/api/v1/space/${SPACE_ID}/equipment/externalReference/${REFERENCE}

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Specific parameters

Parameter Required Type Default Description
REFERENCE true string Your internal reference product.

Redirect by mypangee reference

curl https://${URL}/api/v1/space/${SPACE_ID}/equipment/internalReference/${REFERENCE}
      --request GET

With this API you can redirect user from your site to mypangee martketplace with the mypangee reference of product.

Of course, you have to ask the reference to mypangee for product(s).

GET https://${URL}/api/v1/space/${SPACE_ID}/equipment/internalReference/${REFERENCE}

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Specific parameters

Parameter Required Type Default Description
REFERENCE true string mypangee reference product.

Product - Complement

Insurances

curl -G -X GET 'https://{URL}/api/v1/space/{SPACE_ID}/equipment/insurance' \
    --data-urlencode 'categoryId=8'  \
    --data-urlencode 'quantity=1'  \
    --data-urlencode 'productPriceInCts=123400'

The above command returns JSON structured like this:

[
    {
        "pricings": {
            ... // see to the Get Price part
        },
        "insurancePack": {
            "id": 88,
            "code": "DKT_ASSISTANCE_AXA_50",
            "name": "Assistance 50 km ",
            "description": "",
            "image": "https://static.mypangee.com/images/logos/logo-sans-label.png",
            "option": true
        },
        "insuranceKinds": [
            "ASSISTANCE" // See on parameters part
        ],
        "id": 88,
        "minimalPricePurchaseKind": "RENT_PRODUCT_WITH_REDEMPTION",
        "minimalPrice": {
            ...
        }
    },
    ...
]

With this API you can get the isurances and pricing for a product.

GET https://${URL}/api/v1/space/${SPACE_ID}/equipment/insurance

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Specific parameters

Parameter Required Type Default Description
categoryId true number The product category id will be used to filter insurances
quantity true number 1 Quantity of product
productPriceInCts true number Price in cts of insured product
productTrademark true string Trademark of insured product

List of insurance kinds

Services

curl -G -X GET 'https://{URL}/api/v1/space/{SPACE_ID}/equipment/additionalService' \
    --data-urlencode 'categoryId=8'  \
    --data-urlencode 'quantity=1'

The above command returns JSON structured like this:

[
    {
        "pricings": {
             ... // see to the Get Price part
        },
        "additionalService": {
            "id": 113,
            "name": "FORFAIT ENTRETIEN",
            "description": "Prestation de main d'oeuvre ...",
            "publicPriceInCts": 4600,
            "sellingPriceInCts": 4784,
            "frequencyInMonths": 12, // frequency in months
            "image": "https://media.mypangee.com/image.png",
            "technicalDataSheetUrl": "http://media.mypangee.com/file.pdf", // link to the tehcnical document
            "paymentMode": "OCCURRENCE",  // See on parameters part
            "externalCode": "external_code", // retialer code
            "internalCode": "internal Code", // mypangee code
            "company": ""
        },
        "id": 113,
        "minimalPricePurchaseKind": "RENT_PRODUCT_WITH_REDEMPTION",
        "minimalPrice": {
            ...
        }
    }
    ...
]

With this API you can get the services and pricing for a product category.

GET https://${URL}/api/v1/space/${SPACE_ID}/equipment/additionalService

Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
SPACE_ID true number Your marketplace ID, given by mypangee team

Header parameters

Parameter Required Type Default Description
X-API-Token true string Your authentication token for API with non-public information. This must be kept private.

Spécific parameter

Parameter Required Type Default Description
categoryId true number The product category id will be used to filter services
quantity true number 1 Quantity of product

List of service payment mode

Test

Environment

You can use our test environment for testing the API. Your endpoint URL will be something like "bigcorp.mypangee.com", in test just append ".dev" before "mypangee.com" : "bigcorp.dev.mypangee.com".

In this environment, no real payment are performed, no billing are created and all the emails are send to MyPangee team. If you want to see those emails, ask us.

Values

- Credit card -

number: 1111222233334444

expiry date: 12/{current_year} (ex 12/19)

CVV: 123

- Bank Account -

IBAN: FR7630006000011234567890189

BIC: SEPAFRPP313

Errors

The API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- You are trying to do something not allowed.
404 Not Found -- The ressource you asked doesn't exists.
405 Method Not Allowed -- Check your Http method.
406 Not Acceptable -- You requested a format that isn't json.
418 I'm a teapot.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

Parameters

Here is the description about the parameters you can find in most of our API.

Categories

Product categories are used for choosing the right settings (rental rates, contribution, ...). For getting the list of categories, you can see the output of this page :

Equipment State

Kind Description
NEW The state equipment for new product.
RECONDITIONED_A The state equipment for reconditioned grade A.
RECONDITIONED_B The state equipment for reconditioned grade B.
RECONDITIONED_C The state equipment for reconditioned grade C.
SECOND_HAND_CONDITION_AS_NEW The state equipment for used product (condition as new).
SECOND_HAND_VERY_GOOD_STATE The state equipment for used product (very good sate).
SECOND_HAND_GOOD_STATE The state equipment for used product (good state).

Equipment Type

Kind Description
PRODUCT Use for product equipment. The funding purchase could have minimum one product equipment in shopping cart. Only product equipment could have insurance.
ACCESSORY Use for accessory equipment. The redemption value for accessory equipment on funding purchase is always 0.

Person Type

Kind Description
NATURAL Use for physical person.
COMPANY Use for company.

Purchase Kind

Kind Description
CASH_IN_SINGLE_INSTALMENT The customer will pay the full purchase price when creating the purchase.
CASH_IN_SEVERAL_INSTALMENTS The customer will pay the full purchase price in 3 or 4 instalment.
RENT_PRODUCT_WITH_REDEMPTION The customer will pay the purchase (to which we add interest) every month for the duration he chose. The retailer sells the product to our financial partner and commit to buy the product back

to a certain amount at the end of the rental period.

RENT_PRODUCT_WITHOUT_REDEMPTION | The customer will pay the purchase (to which we add interest) every month for the duration he chose. The retailer sells the product to our financial partner at the end of the rental period the financial partner will be owner of the product.

Purchase Status

Status Description
WAITING_FOR_PAYMENT The first step, we are waiting for the customer to complete the payment process. For cash purchase he will pay the full purchase. For rental, only the fees.
WAITING_FOR_REQUIRED_DOCUMENTS Only in rentals purchase. The customer has to upload his documents (ID, payroll ...) and sign the purchase order.
TO_REVIEW_BY_CREDITOR Only for rental. The case was send to the financial partner, he will give us his response shortly.
TO_REVIEW_BY_CREDITOR_ADDITIONAL Only for rental. The case was send to the financial partner, he will give us his response shortly.
CANCELLED The purchase has been cancelled for any reason.
DENIED_BY_CREDITOR Only for rental. The financial partner refused the case.
WAITING_FOR_DELIVERY The purchase is fully paid, the retailer can proceed to the delivery. In rental purchase this means the case was accepted by the financial partner.
CURRENT_DELIVERY The purchase is fully paid and is on current delivery.
WAITING_FOR_SELLER_DOCUMENTS We are waiting for the retailer to send us the billings and (if needed) the customer to sign the contract.
ONGOING_RENTAL The product is shipped, the rent are paid.
ONGOING_RENTAL_CONTINUE The purchase continue after the official end date.
CLOSED The whole case is complete.

Purchase Item Kind

Kind Description
ACCESSORY An accessory (helmet, lock)
INSURANCE_PACK A group of insurance
INSURANCE An insurance
ADDITIONAL_SERVICE A service
PRODUCT A product

Shipping Type

Kind Description
PICKUP user will choose a store at which he will pickup his purchase.
HOME_DELIVERY This must be setup with MyPangee team.
STORE use this kind for store purchase.

Shopping Cart Target

Kind Description
SHOPPING_CART Redirect the customer to the marketplace shopping cart page
EQUIPMENT_COMPLEMENT Redirect the customer to the marketplace equipment complement (insurance and additionals services) page

Family situation

Kind Description
ALONE Single person.
MARRIED Married person
COUPLE_OR_PACS Person in couple or PACS
DIVORCED Divorced person
WIDOW Widowed person

Home situation

Kind Description
LANDOWNER Landowner person
TENANT Tenant person
LODGED hosted for free

Job contract

Kind Description
PERMANENT Permanent contract
FIXED_TERM Fixed-term contract
INTERIM Interim contract
NONE Without work contract

Job

Kind Description
UNEMPLOYED The person is unemployed
RETIRED The person is retired
EMPLOYEE The person is employed
MANAGER The person is a manager
SUP_MANAGER The person is a senior manager
MERCHANT The person is a merchant
FARMER The person is a farmer
COMPANY_MANAGER The person is a company manager
LIBERAL Liberal profession
OFFICIAL The person is an offical
MILITARY The person is a soldier

Civility

Kind Description
MRS The person is a woman
MR The person is a man

Insurance kind

Kind Description
THEFT theft insurance
BOMBINGS bombings insurance
BREAKAGE breakage insurance
DEATH_LOSS_OF_AUTONOMY death loss of autonomy insurance
DISABILITY disability insurance
EXTENDED_WARRANTY extended warranty
FIRE fire insurance
FORCE_OF_NATURE force of nature insurance
NATURAL_DISASTERS natural disasters insurance
OXIDATION oxidation insurance
PHONE_SUPPORT phone support
ASSISTANCE assistance
CIVIL_LIABILITY_ACTION_AND_DEFENSE civil liability action and defence insurance
FULL_REPLACEMENT full replacement insurance
TECHNOLOGICAL_DISASTERS technological disasters insurance

Service payment mode

Kind Description
OCCURRENCE the payment is by prestation (example: bike maintenance for 20€/year, for 36 months purchase the service price is 3 * 30€ = 90€
GLOBAL the payment is global (example: 1 bike repair whell for 60€, for 36 months purchase the service price is 1 * 60€ = 60€

Documentation

You can see the fonctionnal documentation of API: Documentation