ProdCloud API - OrderStatus service

Le service OrderStatus permet de créer une commande dans le système si elle n’existe pas déjà. Par mesure de sécurité, en plus de l’identification, un filtrage par IP peut être mis en place.

  • Resource URL : /create-order
  • HTTP method : POST
  • Argument : order
  • Exemple de "order" :
  • {
      "reference": "8bcec2",
      "site_reference": "ByKaza.com",
      "customer_reference": "CUSTER4",
      "customer_email": "customer@gmail.com",
      "customer_gender": "M",
      "customer_first_name": "G\u00e9rard",
      "customer_last_name": "MEMBU",
      "customer_phone": "+336 07 08 09 10",
      "currency_code": "EUR",
      "deliveries": [
        {
          "due_date": "2016-03-02 10:00:01",
          "reference": "8bcec2D1",
          "gender": "F",
          "first_name": "J\u00e9scica",
          "last_name": "RAMEL",
          "postal_address": {
            "address1": "4 rue de la mairie",
            "address2": "3eme \u00e0 gauche",
            "address3": "avant l'\u00e9glise",
            "zip_code": "27530",
            "city": "Ezy sur Eure",
            "country_code": "FR",
            "phone": "+332 26 35 66 98",
            "access_code": "Digicode:ML458"
          },
          "email": "jramel@gmail.com",
          "shipping_category": "",
          "shipping_price": 3.45,
          "shipping_vat": 0.63,
          "items": [
            {
              "reference": "8bcec2-I1",
              "product_ref": "MUG",
              "quantity": 2,
              "price": 23.45,
              "vat": 4.65,
              "url_src": "https:\/\/phdev.fr\/fakepdf\/index.php?w=195&h=85&img=http:\/\/vanalyse.fr\/PhotosTest\/026.jpg&type=full&npage=1",
              "url_thumbnail": "http:\/\/vanalyse.fr\/PhotosTest\/026.jpg"
            },
            {
              "reference": "8bcec2-I2",
              "product_ref": "CHROMALUX3624",
              "quantity": 1,
              "price": 11.52,
              "vat": 2.32,
              "url_src": "https:\/\/phdev.fr\/fakepdf\/index.php?w=366&h=246&img=http:\/\/vanalyse.fr\/PhotosTest\/022.jpg&type=full&npage=1",
              "url_thumbnail": "http:\/\/vanalyse.fr\/PhotosTest\/022.jpg"
            }
          ]
        },
        {
          "due_date": "2016-04-02 10:00:01",
          "reference": "8bcec2D2",
          "gender": "F",
          "first_name": "J\u00e9scica",
          "last_name": "RAMEL",
          "postal_address": {
            "address1": "4 rue de la mairie",
            "address2": "3eme \u00e0 gauche",
            "address3": "avant l'\u00e9glise",
            "zip_code": "27530",
            "city": "Ezy sur Eure",
            "country_code": "FR",
            "phone": "+332 26 35 66 98",
            "access_code": "Digicode:ML458"
          },
          "email": "jramel@gmail.com",
          "shipping_category": "Tracked",
          "shipping_price": 3.45,
          "shipping_vat": 0.63,
          "items": [
            {
              "reference": "8bcec2-I3",
              "product_ref": "GALAXYS6",
              "quantity": 2,
              "price": 23.45,
              "vat": 4.65,
              "url_src": "https:\/\/phdev.fr\/fakepdf\/index.php?w=101&h=158&img=http:\/\/vanalyse.fr\/PhotosTest\/020.jpg&type=full&npage=1",
              "url_thumbnail": "http:\/\/vanalyse.fr\/PhotosTest\/020.jpg"
            }
          ]
        }
      ]
    }            
  • Exemple retour :
    {
      "reference": "8bcec2",
      "_links": {
        "self": {
          "href": "http:\/\/localhost:3007\/create-order"
        }
      }
    }
                
  • Exemple de tests unitaires sur demande