mass customization api for brochures, t-shirts, posters, business cards, photo products, wallpapers, shoes, sticker, surfboards and much more
Welcome Guest, you are in: Login

delivergo® XML JSON Print / Mass Customization API

RSS RSS

Navigation





Search Web2Print Wiki
»


  • Create Account 
    mass customization api for brochures, t-shirts, posters, photobooks, business cards, photo products, wallpapers, shoes, sticker, surfboards and much more
      
Web2Print Cloud Lab

Web2Print Cloud Lab

1 Table of Contents


2 Overview

The contacting object holds the contact data for a customer.

3 Elements

Name Type Datatype Example Default Description
Active required bool true false Whether the contacting should be activated or not.
ClientNumber optional string - - Optional client number. If not supported, an automatic generated number will be assigned.
ContactingAddress required array - - List of address-assignments.
ContactingSetting optional array - - List of settings for the customer. See here Settings.
CurrencyToken required string(3) EUR EUR Three letter ISO currency code identifying the preferred currency for this contacting. See here.
Discount optional guid - - Represents the Discount Level the contacting is currently assigned to.
DisplayLocale required string de-DE - Localisation info to be used to format numbers, dates etc according to a specific region.
Handle optional string - - Optional user handle.
IdTimeZone optional int - - Identifies the assigned TimeZone, corresponding with the Id element of a TimeZone object. If not set, local server time will be assumed.
LanguageToken required string(2) DE - Two letter ISO 639-1 Code of the Language to be used for the current translation item.
Login required string - - User login.
Password required string - - Hashed password. Hashing algorithm: MD5.
ResaleUnit optional array - - Optional array of Resale Units attached to this contacting. Required for Affiliates that want to sell on different locations with different prices.
UserImageUri optional string - - Optional URI to an image that can be used as a profile picture or avatar.

3.1 Endpoints

To get a list of existing discounts for a specific customer, the following URI needs to be used. As the customer cannot administrate it's own discounts, but only the profits, the URI differs for Add/Update/Delete actions.

3.1.1 Get existing contacting via Guid

GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/Guid/CustomerGuid

3.1.2 Get existing contacting via e-mail address

GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/Email/EmailAddress

3.1.3 Add new contacting

There are two kinds of contacting that can be added.

3.1.3.1 Affiliate

PUT https://api.delivergo.com/portal/PortalNamespace/api/Customer/Affiliate

3.1.3.2 End customer

PUT https://api.delivergo.com/portal/PortalNamespace/api/Customer

The sample below adds a new contacting, including one address with E-Mail, phone number, plus a new Resale Unit.

JSON:

{
  "Active":false,
  "ContactingAddress":[
     {
        "Active":true,
        "Address":{
           "Active":true,
           "AddressAssignment":[
              {
                 "AddressTypeToken":"MAIN"
              }
           ],
           "City":"Berlin",
           "Company":"dsf",
           "CountryToken":"DE",
           "Email":[
              {
                 "Active":true,
                 "Text":"testuser@testworld.de"
              }
           ],
           "Forename":"lkjh",
           "GreetingToken":"Formal",
           "ObjectNote":{
              "Text":"Note for address"
           },
           "SalutationToken":"Male",
           "Street":"kh",
           "Surname":"kh",
           "Telecommunication":[
              {
                 "Active":true,
                 "Number":"testtelefon",
                 "TypeToken":"Phone"
              }
           ],
           "ZipCode":"10587"
        }
     }
  ],
  "CurrencyToken":"USD",
  "DisplayLocale":"de-DE",
  "Handle":"testuser",
  "LanguageToken":"DE",
  "Login":"testuser@testworld.com",
  "Password":"26EE8F846513198DDFF3ADC90CF47643",
  "ResaleUnit":[
     {
        "Active":true,
        "CurrencyToken":"USD",
        "ResaleUnitTranslation":[
           {
              "Description":"Description",
              "LanguageToken":"DE",
              "Name":"Name"
           }
        ]
     }
  ]
}

3.1.4 Update existing contacting

Using this endpoint you can update existing contactings. Note that when you create a new contacting and want to update it, you need to use the object the server returns upon creation of a new contacting. This way it will be ensured that all ID's are correctly in sync with the database object, this the update mechanism knows what to update and where. You cannot change the password using this endpoint.

POST https://api.delivergo.com/portal/PortalNamespace/api/Customer

3.1.5 Update contacting password

Using this endpoint you can change a password of a specific user. All you need to supply is a contacting object with a Password field.

POST https://api.delivergo.com/portal/PortalNamespace/api/Customer/CustomerGuid/Password

You will then get a response having a Value element that indicates whether the password change was successful.

JSON:

{
   "Header":{
      "Currency":"EUR",
      "Language":"EN",
      "SystemOfMeasurement":"Metric"
   },
   "Status":{
      "Messages":[
         {
            "Code":1000,
            "Key":"Success",
            "Text":"Request successful."
         }
      ]
   },
   "Value":true
}

XML:

<ResponseOfBoolean xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://delivergo.net/api">
  <Header>
    <Currency>EUR</Currency>
    <IsDebug>false</IsDebug>
    <Language>EN</Language>    
    <SystemOfMeasurement>Metric</SystemOfMeasurement>        
  </Header>
  <Status>
    <Messages>
      <Message>
        <Code>1000</Code>
        <Key>Success</Key>
        <Text>Request successful.</Text>
      </Message>
    </Messages>
  </Status>
  <Value>true</Value>
</ResponseOfBoolean>

3.1.6 Delete contacting via Guid

Use the following endpoint to delete a contacting from the database by using it's Guid.

DELETE https://api.delivergo.com/portal/PortalNamespace/api/Customer/CustomerGuid

You will then get a response having a Value element that indicates whether the deletion was successful.

3.2 Additional endpoints

There are additional endpoints to check if specific Login, ClientNumber, E-Mail-Address or ContactingSetting values are already present in the system.

All endpoints will return a single value or list of values, separated by a comma.

Here is a list of possible values.

  • Found - a contacting was found.
  • NotFound - no contacting was found.
  • Activated - the contacting is active.
  • Disabled - the contacting is disabled(not active).
  • NeedsActivation - the contacting requires activation.

3.2.1 Check for existing Login

GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/Login/login/Exists

3.2.2 Check for existing ClientNumber

GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/ClientNumber/clientNumber/Exists

3.2.3 Check for existing e-mail address

This endpoint will return whether a contacting with a specific e-mail address does exist. The e-mail address must me assigned to the main address i.e. AddressTypeToken must be Main in AddressAssignment entry.

GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/Email/emailAddress/Exists

3.2.4 Check for existing ContactingSetting

Use the following endpoint to check for a contacting by a specific setting, which holds a key and value pair.

GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/Setting/settingKey/settingValue/Exists

3.2.5 Authentication

To authenticate a customer you need to supply an object with two elements: Login and Password, where Password must be MD5 hashed. You can also use Id, Guid or ClientNumber instead of Login. You will then get the associated contacting object, provided your login credentials are correct. If not, you can get the login status by evaluating the AuthenticationStatus element of the response.

POST https://api.delivergo.com/portal/PortalNamespace/api/Customer/Authenticate

3.2.6 Account Activation

To request contacting activation you can use this URI:

POST https://api.delivergo.com/portal/PortalNamespace/api/Customer/RequestActivation

You need to supply the following object structure as body:

JSON:

{
  "ActivationLinkFull": "http://host.com/activate?user=$CustomerGuid$&code=$ActivationCode$",
  "ActivationLink": "http://host.com/activate",
  "Contacting": {
    "Login": "user@portal.com",
  }
}

The Contacting element can have either Id, Guid, ClientNumber or Login. The customer will then get an email including the instructions to activate his account. Account activations can be repeated but will have a forced delay of ten minutes. If you want to implement your own activation page, you need to support both ActivationLinkFull and ActivationLink elements.

ActivationLinkFull is the full URI template to the activation page, in which you can use two placeholders: $ContactingGuid$ and $ActivationCode$, that will get evaluated prior the delivery of activation email. If you support your own activation code, you can fully customize the ActivationLinkFull element according to your needs. In return you can pre-publish these two fields from the incoming URI and just let the user confirm these to activate his account.

ActivationLink is used as a fallback whenever links get broken or cannot be clicked directly when receiving the activation email. For this case your activation page needs to acquire these values directly from the user input.

3.2.7 Passwort recovery

To request a new password you need to supply an object with eitherId, Guid, ClientNumber or Login. The customer will then get an email with the new credentials. Password recoveries can be repeated but will have a forced delay of ten minutes.

POST https://api.delivergo.com/portal/PortalNamespace/api/Customer/RecoverPassword

JSON:

{
   "Login": "user@portal.com",
   "Password": "26EE8F846513133DDFF3ADC90CF47643"
}

3.2.8 Get contacting via setting

Use the following endpoint to get a contacting by a specific setting, which holds a key and value pair.

GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/Setting/settingKey/settingValue

3.2.9 Get contacting via e-mail address

Use the following endpoint to get a contacting by a specific e-mail address.

GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/Email/emailAddress
  Name Size
- 20110530_DGO_talking.png 41.62 KB
____________

Discussions about Web2Print SaaS Cloud API JSON REST XML:

{discussion}

ScrewTurn Wiki version 3.0.4.560. Icons created by FamFamFam.