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

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

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.

POST 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

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 false 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 false number Shipping cost by product unit with taxes.
shippingType false 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
      --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"
}
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']
];

const crypto = require('crypto');
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 the subscription page 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

Specific parameters

Parameter Required Type Default Description
lifeSpan false number see notice below The shopping cart life span

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.

Shopping cart 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 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}&
      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}&
      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 the subscrition page 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 POST https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/add

Like for the Add shopping cart call, using this POST call with urlencoded parameters will redirect to the customer subscription page, but wuth json parameters will return the subscription page url as a response.

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
lifeSpan false number see notice below The shopping cart life span

Specific parameters

Parameter Required Type Default Description
categoryId true number Category ID, look values for details
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.
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).

Add Product By External Reference

 https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/addEquipment/externalReference?
     equipmentState=${equipmentState}&
     insurances=${insurance}&
     quantity=${quantity}&
     reference=${reference}&
     services=${services}&
     --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 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

Specific parameters

Parameter Required Type Default Description
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.

Add Product By mypangee Reference

 https://${URL}/api/v1/space/${SPACE_ID}/shoppingcart/addEquipment/internalReference?
      equipmentState=${equipmentState}&
      insurances=${insurance}&
      quantity=${quantity}&
      reference=${reference}&
      services=${services}&
    --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
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.

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 string 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 string 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 string 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 - Deliver file

You need to do this kind of request :

curl  --request POST \
      --header "X-API-Token: ${TOKEN}" \
      https://${URL}/api/v1/purchase/${PURCHASE_ID}/deliverFile \
      --form 'attachedFile=@"yourFile"' \

or or with your own external ID

curl  --request POST \
      --header "X-API-Token: ${TOKEN}" \
      https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/deliverFile \
      --form 'attachedFile=@"yourFile"' \

This API allow you to attach proof of postal deposit.

Your are authenticated by your TOKEN.

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

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 string 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

Purchase - Cancel

You need to do this kind of request :

curl --request PUT \
     --header "X-API-Token: ${TOKEN}" \
    https://${URL}/api/v1/purchase/${PURCHASE_ID}/cancel?reason={reason}&details={details} \

or or with your own external ID

curl --request PUT \
     --header "X-API-Token: ${TOKEN}" \
     --header "Content-Type: application/json" \
    https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/cancel?reason={reason}&details={details} \

This API allows you to cancel a purchase with purchase Id or external Id. The cancellation details will be visible for the customer.

Your are authenticated by your TOKEN.

Global parameters

PUT https://${URL}/api/v1/purchase/${PURCHASE_ID}/cancel

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

Global parameters

PUT https://${URL}/api/v1/purchase/external/${EXTERNAL_ID}/cancel

Parameter Required Type Default Description
URL true string Your endpoint URL, given by mypangee team
EXTERNAL_ID true string 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
reason true string must be one of this list : REQUESTED_BY_CUSTOMER, EXPIRED_ORDER, OUT_OF_STOCK, OTHER
details true string the cancellation reason details that will be provided to the cutomer

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 string 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 invoice id
invoiceDate true string The invoice date

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 insurances 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'  \
    --data-urlencode 'productPriceInCts=123400'

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
productPriceInCts true number Price in cts of insured product

List of service payment mode

Article model - Catalog

Find one article model

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel/${CODE_ARTICLE_MODEL} \
      --request GET \
      --header "X-API-Token: ${TOKEN}"

With this API, you can retrieve an article model along with its articles by its code in a specific space catalog.

GET https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel/${CODE_ARTICLE_MODEL}

Global parameters

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

Specific parameters

Parameter Required Type Default Description
CODE_ARTICLE_MODEL true string The code identifier for the article model is either the reference or the SKU.

Response

A successful call to this API will return a JSON object with the following structure:

{
  "sku": "xxxxx",
  "reference": "xxxxx",
  "articles": [
    {
      "cashPriceInCts": 100000,
      "characteristics": [
        {
          "code": "ASSISTANCE",
          "value": "ASSISTANCE"
        }
      ],
      "fundingPriceInCts": 100000,
      "name": ".",
      "options": [
        {
          "code": "COLOR",
          "value": "rouge"
        }
      ],
      "picture": "https://media.mypangee.com/images/marketplace/xxxxx/2021/xxxxx.jpg",
      "publicPriceInCts": 100000,
      "purchasePriceInCts": 100000,
      "reference": "xxxxx",
      "replenishmentLeadTime": 0,
      "sku": "xxxxx",
      "state": "NEW",
      "stock": -1,
      "warranty": -1
    }
  ],
  "categoryId": 16,
  "characteristics": [],
  "description": "xxxxx",
  "name": "xxxxx",
  "options": [],
  "picture": "https://media.mypangee.com/images/marketplace/xxxxx/2021/xxxxx.jpg",
  "sizeGuideUrl": "xxxxx",
  "technicalDataSheetUrl": "xxxxx",
  "trademark": "xxxxx",
  "type": "PRODUCT",
  "video": "xxxxx"
}

Find all article models

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel/all \
      --request GET \
      --header "X-API-Token: ${TOKEN}"

With this API you can retrieve all article model with its articles in a specific space catalog.

GET https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel/all

Common Global parameters

Parameter Required Type Default Description
URL true string Your endpoint URL
SPACE_ID true number Your marketplace ID

Response

[
  {
    "sku": "xxxxx",
    "reference": "xxxxx",
    "articles": [
      {
        "cashPriceInCts": 100000,
        "characteristics": [
          {
            "code": "ASSISTANCE",
            "value": "ASSISTANCE"
          }
        ],
        "fundingPriceInCts": 100000,
        "name": ".",
        "options": [
          {
            "code": "COLOR",
            "value": "rouge"
          }
        ],
        "picture": "https://media.mypangee.com/images/marketplace/xxxxx/2021/xxxxx.jpg",
        "publicPriceInCts": 100000,
        "purchasePriceInCts": 100000,
        "reference": "xxxxx",
        "replenishmentLeadTime": 0,
        "sku": "xxxxx",
        "state": "NEW",
        "stock": -1,
        "warranty": -1
      }
    ],
    "categoryId": 16,
    "characteristics": [],
    "description": "xxxxx",
    "name": "xxxxx",
    "options": [],
    "picture": "https://media.mypangee.com/images/marketplace/xxxxx/2021/xxxxx.jpg",
    "sizeGuideUrl": "xxxxx",
    "technicalDataSheetUrl": "xxxxx",
    "trademark": "xxxxx",
    "type": "PRODUCT",
    "video": "xxxxx"
  }
  // more
]

Create a new article model

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel \
      --request POST \
      --header "X-API-Token: ${TOKEN}" \
      --header "Content-Type: application/json" \
      --data @- <<REQUEST_BODY
{
  "sku": "xxxxx",
  "reference": "xxxxx", // Is mandatory
  "articles": [
    {
      "cashPriceInCts": 100000,
      "characteristics": [
        {
          "code": "ASSISTANCE",
          "value": "ASSISTANCE"
        }
      ],
      "fundingPriceInCts": 100000,
      "name": ".",
      "options": [
        {
          "code": "COLOR",
          "value": "rouge"
        }
      ],
      "picture": "https://media.mypangee.com/images/marketplace/xxxxx/2021/xxxxx.jpg",
      "publicPriceInCts": 100000,
      "purchasePriceInCts": 100000,
      "reference": "xxxxx", // Is mandatory
      "replenishmentLeadTime": 0,
      "sku": "xxxxx",
      "state": "NEW", // Is mandatory
      "stock": -1,
      "warranty": -1
    }
  ],
  "categoryId": 16,
  "characteristics": [],
  "description": "xxxxx",
  "name": "xxxxx",
  "options": [],
  "picture": "https://media.mypangee.com/images/marketplace/xxxxx/2021/xxxxx.jpg",
  "sizeGuideUrl": "xxxxx",
  "technicalDataSheetUrl": "xxxxx",
  "trademark": "xxxxx",
  "type": "PRODUCT", //The type has the parameter PRODUCT or ACCESSORY
  "video": "xxxxx"
}
REQUEST_BODY

With this API, you can create a new article model with its articles in a specific space catalog.

POST https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel

Global parameters

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

Request Body

The request body should contain a JSON object representing the article model to be created.
The array of objects characteristics is a description of the article model.
The array of objects options differentiates an article model.
The key categoryId is the identifier of the category that is attached to the article model.
The reference key is mandatory.
The key type has the value PRODUCT or ACCESSORY only.

Expected Response

A successful call to this API will return a 200 OK status.

Update an existing article model

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel \
      --request PUT \
      --header "X-API-Token: ${TOKEN}" \
      --header "Content-Type: application/json" \
      --data @- <<REQUEST_BODY
{
  "sku": "xxxxx",
  "reference": "xxxxx",
  "articles": [
    {
      "cashPriceInCts": 100000,
      "characteristics": [
        {
          "code": "ASSISTANCE",
          "value": "ASSISTANCE"
        }
      ],
      "fundingPriceInCts": 100000,
      "name": ".",
      "options": [
        {
          "code": "COLOR",
          "value": "rouge"
        }
      ],
      "picture": "https://media.mypangee.com/images/marketplace/xxxxx/2021/xxxxx.jpg",
      "publicPriceInCts": 100000,
      "purchasePriceInCts": 100000,
      "reference": "xxxxx",
      "replenishmentLeadTime": 0,
      "sku": "xxxxx",
      "state": "NEW",
      "stock": -1,
      "warranty": -1
    }
  ],
  "categoryId": 16,
  "characteristics": [],
  "description": "xxxxx",
  "name": "xxxxx",
  "options": [],
  "picture": "https://media.mypangee.com/images/marketplace/xxxxx/2021/xxxxx.jpg",
  "sizeGuideUrl": "xxxxx",
  "technicalDataSheetUrl": "xxxxx",
  "trademark": "xxxxx",
  "type": "PRODUCT",
  "video": "xxxxx"
}
REQUEST_BODY

With this API, you can update an existing article model in a specific space catalog.

PUT https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel

Global parameters

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

Request Body

The request body should contain a JSON object representing the article model to be updated.
The array of objects characteristics is a description of the article model.
The array of objects options differentiates an article model.
The key categoryId is the identifier of the category that is attached to the article model.
The reference key is mandatory.
The key type has the value PRODUCT or ACCESSORY only.

Expected Response

A successful call to this API will return a 200 OK status.

Add a new article to an existing article model

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/article/add/${CODE_ARTICLE_MODEL} \
      --request POST \
      --header "X-API-Token: ${TOKEN}" \
      --header "Content-Type: application/json" \
      --data @- <<REQUEST_BODY
{
  "cashPriceInCts": 100000,
  "characteristics": [
    {
      "code": "ASSISTANCE",
      "value": "ASSISTANCE"
    }
  ],
  "fundingPriceInCts": 100000,
  "name": "xxxx",
  "options": [
    {
      "code": "SIZE",
      "value": "S"
    }
  ],
  "picture": "https://media.mypangee.com/images/xxxx/xxxx/2019/xxxx/.jpg",
  "publicPriceInCts": 100000,
  "purchasePriceInCts": 100000,
  "reference": "xxxx",
  "replenishmentLeadTime": 0,
  "sku": "xxxx",
  "state": "NEW",
  "stock": 2,
  "warranty": 2
}
REQUEST_BODY

With this API, you can add a new article to an existing article model in a specific space catalog.

POST https://${URL}/api/v1/space/${SPACE_ID}/catalog/article/add/${CODE_ARTICLE_MODEL}

Global parameters

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

Specific parameters

Parameter Required Type Default Description
CODE_ARTICLE_MODEL true string The code identifier for the article model is either the reference or the SKU.

Request Body

The request body should contain a JSON object representing the article to be added.
The array of objects characteristics is a description of the article.
The array of objects options differentiates an article.
The key categoryId is the identifier of the category that is attached to the article.
The reference key is mandatory.
The key type has the value PRODUCT or ACCESSORY only.

Expected Response

This API returns a 200 OK status if the article is successfully added.

Add multiple new articles to an existing article model

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/articles/add/${CODE_ARTICLE_MODEL} \
      --request POST \
      --header "X-API-Token: ${TOKEN}" \
      --header "Content-Type: application/json" \
      --data @- <<REQUEST_BODY
[
  {
    "cashPriceInCts": 100000,
    "characteristics": [
      {
        "code": "ASSISTANCE",
        "value": "ASSISTANCE"
      }
    ],
    "fundingPriceInCts": 100000,
    "name": "xxxx",
    "options": [
      {
        "code": "SIZE",
        "value": "S"
      }
    ],
    "picture": "https://media.mypangee.com/images/xxxx/xxxx/2019/xxxx/.jpg",
    "publicPriceInCts": 100000,
    "purchasePriceInCts": 100000,
    "reference": "xxxx",
    "replenishmentLeadTime": 0,
    "sku": "xxxx",
    "state": "NEW",
    "stock": 2,
    "warranty": 2
  },
  // more article
]
REQUEST_BODY

With this API, you can add multiple new articles to an existing article model in a specific space catalog.

POST https://${URL}/api/v1/space/${SPACE_ID}/catalog/articles/add/${CODE_ARTICLE_MODEL}

Global parameters

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

Specific parameters

Parameter Required Type Default Description
CODE_ARTICLE_MODEL true string The code identifier for the article model is either the reference or the SKU.

Request Body

The request body should contain a JSON object representing the article to be added.
The array of objects characteristics is a description of the article.
The array of objects options differentiates an article.
The key categoryId is the identifier of the category that is attached to the article.
The reference key is mandatory.
The key type has the value PRODUCT or ACCESSORY only.

Expected Response

This API returns a 200 OK status if the articles are successfully added.

Upload media for a specific article

curl "https://${URL}/api/v1/space/${SPACE_ID}/catalog/upload/picture/articleModel/${CODE_ARTICLE_MODEL}" \
      -request POST \
      --header "X-API-Token: ${TOKEN}" \
      --header "accept: */*" \
      --header "Content-Type: multipart/form-data" \
      --form "attachedFile=@'yourFile'"

With this API, you can upload an image file and update the image of an existing article in a specific space catalog.

POST https://${URL}/api/v1/space/${SPACE_ID}/catalog/upload/picture/articleModel/${CODE_ARTICLE_MODEL}

Global parameters

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

Specific parameters

Parameter Required Type Default Description
CODE_ARTICLE_MODEL true string The code identifier for the article is either the reference or the SKU.

Expected Response

This API returns a 200 OK status if the media is successfully uploaded.

Delete an existing article model

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel/${CODE_ARTICLE_MODEL} \
      --header "X-API-Token: ${TOKEN}" \
      --request DELETE

With this API, you can delete an existing article template by its code in a product catalog of a specific space.

DELETE https://${URL}/api/v1/space/${SPACE_ID}/catalog/articleModel/${CODE_ARTICLE_MODEL}

Global parameters

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

Specific parameters

Parameter Required Type Default Description
CODE_ARTICLE_MODEL true string The code identifier for the item model is either the reference or the SKU.

Expected Response

A successful call to this API will return a 200 OK status.

Article - Catalog

Find a specific article by code

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/article/${CODE_ARTICLE} \
      --request GET \
      --header "X-API-Token: ${TOKEN}"

With this API, you can retrieve a specific article by its code in a product catalog of a specific space.

GET https://${URL}/api/v1/space/${SPACE_ID}/catalog/article/${CODE_ARTICLE}

Global parameters

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

Specific parameters

Parameter Required Type Default Description
CODE_ARTICLE true string The code identifier for the article is either the reference or the SKU.

Expected Response

A successful call to this API will return a JSON object containing the details of the specified article.

{
  "cashPriceInCts": 100000,
  "characteristics": [
    {
      "code": "ASSISTANCE",
      "value": "ASSISTANCE"
    }
  ],
  "fundingPriceInCts": 100000,
  "name": "xxxxx",
  "options": [
    {
      "code": "SIZE",
      "value": "S"
    }
  ],
  "picture": "https://media.mypangee.com/images/xxxxx//xxxxx//2019//xxxxx/.jpg",
  "publicPriceInCts": 100000,
  "purchasePriceInCts": 100000,
  "reference": "xxxxx",
  "replenishmentLeadTime": 0,
  "sku": "xxxxx",
  "state": "NEW",
  "stock": 2,
  "warranty": 2
}

Find all article

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/article/all \
      --request GET \
      --header "X-API-Token: ${TOKEN}"

With this API, you can retrieve all the articles in a product catalog of a specific space.

GET https://${URL}/api/v1/space/${SPACE_ID}/catalog/article/all

Global parameters

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

Expected Response

A successful call to this API will return a JSON array containing all article models for the specified space.

[
  {
    "cashPriceInCts": 100000,
    "characteristics": [
      {
        "code": "ASSISTANCE",
        "value": "ASSISTANCE"
      }
    ],
    "fundingPriceInCts": 100000,
    "name": "xxxxx",
    "options": [
      {
        "code": "SIZE",
        "value": "S"
      }
    ],
    "picture": "https://media.mypangee.com/images/xxxxx//xxxxx//2019//xxxxx/.jpg",
    "publicPriceInCts": 100000,
    "purchasePriceInCts": 100000,
    "reference": "xxxxx",
    "replenishmentLeadTime": 0,
    "sku": "xxxxx",
    "state": "NEW",
    "stock": 2,
    "warranty": 2
  }
  // more article models
]

Update an existing article

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/article \
      --request PUT \
      --header "X-API-Token: ${TOKEN}" \
      --header "Content-Type: application/json" \
      --data @- <<REQUEST_BODY
{
  "cashPriceInCts": 100000,
  "characteristics": [
    {
      "code": "ASSISTANCE",
      "value": "ASSISTANCE"
    }
  ],
  "fundingPriceInCts": 100000,
  "name": ".",
  "options": [
    {
      "code": "COLOR",
      "value": "rouge"
    }
  ],
  "picture": "https://media.mypangee.com/images/marketplace/xxxxx##/2021/xxxxx##.jpg",
  "publicPriceInCts": 100000,
  "purchasePriceInCts": 100000,
  "reference": "xxxxx##", // Is mandatory
  "replenishmentLeadTime": 0,
  "sku": "xxxxx##",
  "state": "NEW", // Is mandatory
  "stock": -1,
  "warranty": -1
}
REQUEST_BODY

With this API, you can update an existing article in a product catalog of a specific space.

PUT https://${URL}/api/v1/space/${SPACE_ID}/catalog/article

Global parameters

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

Request Body

The request body should contain a JSON object representing the article to be updated.
The array of objects characteristics is a description of the article.
The array of objects options differentiates an article.
The key categoryId is the identifier of the category that is attached to the article.
The reference key is mandatory.
The key type has the value PRODUCT or ACCESSORY only.

Expected Response

A successful call to this API will return a 200 OK status.

Update multiple existing articles

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/articles \
      --request PUT \
      --header "X-API-Token: ${TOKEN}" \
      --header "Content-Type: application/json" \
      --data @- <<REQUEST_BODY
[
  {
    "cashPriceInCts": 100000,
    "characteristics": [
      {
        "code": "ASSISTANCE",
        "value": "ASSISTANCE"
      }
    ],
    "fundingPriceInCts": 100000,
    "name": "xxxxx",
    "options": [
      {
        "code": "SIZE",
        "value": "S"
      }
    ],
    "picture": "https://media.mypangee.com/images/xxxxx//xxxxx//2019//xxxxx/.jpg",
    "publicPriceInCts": 100000,
    "purchasePriceInCts": 100000,
    "reference": "xxxxx",
    "replenishmentLeadTime": 0,
    "sku": "xxxxx",
    "state": "NEW",
    "stock": 2,
    "warranty": 2
  }
  // more article
]
REQUEST_BODY

With this API, you can update multiple existing articles in a product catalog of a specific space.

PUT https://${URL}/api/v1/space/${SPACE_ID}/catalog/articles

Global parameters

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

Request Body

The request body must contain a JSON object representing a list of article to update. The array of objects characteristics is a description of the article.
The array of objects options differentiates an article.
The key categoryId is the identifier of the category that is attached to the article.
The reference key is mandatory.
The key type has the value PRODUCT or ACCESSORY only.

Expected Response

A successful call to this API will return a 200 OK status.

Upload media for a specific article

curl "https://${URL}/api/v1/space/${SPACE_ID}/catalog/upload/picture/article/${CODE_ARTICLE}" \
      -request POST \
      --header "X-API-Token: ${TOKEN}" \
      --header "accept: */*" \
      --header "Content-Type: multipart/form-data" \
      --form "attachedFile=@'yourFile'"

With this API, you can upload an image file and update the image of an existing article model in a product catalog of a specific space.

POST https://${URL}/api/v1/space/${SPACE_ID}/catalog/upload/picture/article/${CODE_ARTICLE}

Global parameters

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

Specific parameters

Parameter Required Type Default Description
CODE_ARTICLE true string The code identifier for the article is either the reference or the SKU.

Expected Response

This API returns a 200 OK status if the media is successfully uploaded.

Delete a specific article by code

curl https://${URL}/api/v1/space/${SPACE_ID}/catalog/article/${CODE_ARTICLE} \
      --request DELETE \
      --header "X-API-Token: ${TOKEN}" \

With this API, you can delete an existing article by its code in a product catalog of a specific space.

DELETE https://${URL}/api/v1/space/${SPACE_ID}/catalog/article/${CODE_ARTICLE}

Global parameters

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

Specific parameters

Parameter Required Type Default Description
CODE_ARTICLE true string The code identifier for the article is either the reference or the SKU.

Expected Response

This API returns a 200 OK status if the article is successfully deleted.

Categories - Catalog

Get all categories for a specific space

curl https://${URL}/api/v1/space/${SPACE_ID}/category/all \
      --request GET \
       --header "X-API-Token: ${TOKEN}"

With this API, you can retrieve all categories associated with a specific space.

GET https://${URL}/api/v1/space/${SPACE_ID}/category/all

Global parameters

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

Expected Response

A successful call to this API will return a JSON array containing all categories for the specified space.

[
  {
    "id": 3,
    "code": "TRANSPORT",
    "name": "Déplacement - mobilité",
    "fullName": "Déplacement - mobilité",
    "path": "ALL|TRANSPORT|"
  },
  {
    "id": 136,
    "code": "WINDSHIELD",
    "name": "Pare-brise",
    "fullName": "Déplacement - mobilité / Scooter électrique / Accessoires / Pare-brise",
    "path": "ALL|TRANSPORT|SCOOTER-ELECTRIC|ACCESSORY|WINDSHIELD|"
  }
  // more categories
]

Characteristics - Catalog

Get all characteristics

curl https://${URL}/api/v1/space/${SPACE_ID}/characteristic/all \
      --request GET \
      -header "X-API-Token: ${TOKEN}"

With this API, you can retrieve all non-discriminatory characteristics sorted by their codes in a specific space.

GET https://${URL}/api/v1/space/${SPACE_ID}/characteristic/all

Global parameters

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

Expected Response

A successful call to this API will return a JSON array containing all non-discriminatory characteristics sorted by their codes.

[
  {
    "code": "AVERAGE_AUTONOMY",
    "translationFR": "Autonomie moyenne",
    "type": "STRING"
  },
  {
    "code": "BATTERY_CHARGER",
    "translationFR": "Chargeur de batterie",
    "type": "STRING"
  }
  // more characteristics
]

Options - Catalog

Get all options

curl https://${URL}/api/v1/space/${SPACE_ID}/option/all \
      --request GET \
      --header "X-API-Token: ${TOKEN}"

With this API, you can retrieve all discriminatory options sorted by their codes in a specific space.

GET https://${URL}/api/v1/space/${SPACE_ID}/option/all

Global parameters

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

Expected Response

A successful call to this API will return a JSON array containing all discriminatory options sorted by their codes.

[
  {
    "code": "ACCESSORY",
    "translationFR": "Accessoires",
    "OptionType": "STRING"
  },
  {
    "code": "ACCESSORY2",
    "translationFR": "Accessoires 2 ",
    "OptionType": "STRING"
  }
  // more options
]

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 retailer should take the product back.

Purchase Status

Status Description
WAITING_FOR_PAYMENT The first step, we are waiting for the customer to complete the first data.
WAITING_FOR_REQUIRED_DOCUMENTS Only in rentals purchase. The customer has to upload his documents (ID, payroll ...) and sign the purchase order.
WAITING_FOR_FEE_PAYMENT We are waiting for the customer to pay fees, and eventually customer contribution.
WAITING_FOR_IDENTITY_CHECK We are waiting for the customer to complete its identity check.
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.
INCOMPLETE_FORM Only for rental. Our financiel partner has checked the customer data, but decided that documents are missing. The customer should complete its data.
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.

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 30€/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