1 Table of Contents
2 Resale Unit element
Resale units aggregate locations where items can be sold. This can be either a blog, website or any location to support end user business. If you want to define different profits for the same discount on a specific product, you need to define different Resale Units.
2.1 Elements
| Name | Type | Datatype | Example | Default | Description |
|---|
| Id
| optional
| int
| 1
| -
| Primary key. Will be created automatically and serves as an identifier for update and delete actions.
|
| guid
| optional
| Guid
| -
| -
| Will be created automatically and serves as a global unique identifier.
|
| CurrencyToken
| optional
| string(3)
| EUR
| EUR
| Three letter ISO currency code identifying the currency that will be used in the Resale Unit. Affects absolute profit and payout currency. Defaults to EUR. See here.
|
| Created
| returned
| datetime
| -
| -
| Creation date of the item.
|
| Creator
| returned
| guid
| -
| -
| Creator of the item.
|
| Modified
| returned
| datetime
| -
| -
| Last modification date of the item.
|
| Modifier
| returned
| guid
| -
| -
| Modifier of the item.
|
| Active
| required
| bool
| true
| false
| Whether the Resale Unit should be active or not.
|
| ResaleUnitTranslation
| required
| array
| -
| -
| List of translations that describe the Resale Unit element in different languages.
|
2.1.1 ResaleUnitTranslation Elements
| Name | Type | Datatype | Example | Default | Description |
|---|
| LanguageToken
| required
| string
| DE
| -
| Two letter ISO 639-1 Code of the Language to be used for the current translation item.
|
| Name
| required
| string
| -
| -
| Name of the translation item.
|
| Description
| optional
| string
| -
| -
| Optional description of the translation item.
|
2.2 Example
JSON:
{
"Active":true,
"Guid":"97c4a982-be25-41d4-b8c3-8a6d9b3ba86f",
"Created":"\/Date(1299686597893+0100)\/",
"Creator":"1186f976-8aae-4929-b6f2-3ce99553e248",
"Id":1,
"ResaleUnitTranslation":[
{
"Description":"Description",
"LanguageToken":"DE",
"Name":"Name"
}
]
}
XML:
<ResaleUnit xmlns="http://delivergo.net/portal/api">
<Id>1</Id>
<Guid>97c4a982-be25-41d4-b8c3-8a6d9b3ba86f</Guid>
<Creator>1186f976-8aae-4929-b6f2-3ce99553e248</Creator>
<Created>2011-03-09T17:03:17.893</Created>
<Modifier xsi:nil="true" />
<Modified xsi:nil="true" />
<Active>true</Active>
<ResaleUnitTranslation>
<ResaleUnitTranslation>
<LanguageToken>DE</LanguageToken>
<Name>Name</Name>
<Description>Description</Description>
</ResaleUnitTranslation>
</ResaleUnitTranslation>
</ResaleUnit>
2.3 Endpoints
2.3.1 List items
GET https://api.delivergo.com/portal/PortalNamespace/api/Customer/CustomerGuid/ResaleUnits
2.3.2 Add items
PUT https://api.delivergo.com/portal/PortalNamespace/api/Customer/CustomerGuid/ResaleUnits
The sample below will create a new Resale Unit, which will be disabled and gets an English translation using "Name" as Name and "Description" as Description.
JSON:
{
"Active":false,
"ResaleUnitTranslation":[
{
"Description":"Description",
"LanguageToken":"EN",
"Name":"Name"
}
]
}
XML:
<ResaleUnit xmlns="http://delivergo.net/portal/api">
<Active>false</Active>
<ResaleUnitTranslation>
<ResaleUnitTranslation>
<LanguageToken>EN</LanguageToken>
<Name>Name</Name>
<Description>Description</Description>
</ResaleUnitTranslation>
</ResaleUnitTranslation>
</ResaleUnit>
2.3.3 Update items
POST https://api.delivergo.com/portal/PortalNamespace/api/Customer/CustomerGuid/ResaleUnits
The sample below will activate an existing Resale Unit, identified by ID, and update its Translation.
JSON:
{
"Id": 1,
"Active":true,
"ResaleUnitTranslation":[
{
"Description":"NewDescription",
"LanguageToken":"EN",
"Name":"NewName"
}
]
}
XML:
<ResaleUnit xmlns="http://delivergo.net/portal/api">
<Id>1</Id>
<Active>true</Active>
<ResaleUnitTranslation>
<ResaleUnitTranslation>
<LanguageToken>EN</LanguageToken>
<Name>NewName</Name>
<Description>NewDescription</Description>
</ResaleUnitTranslation>
</ResaleUnitTranslation>
</ResaleUnit>
2.3.4 Delete items
DELETE https://api.delivergo.com/portal/PortalNamespace/api/Customer/CustomerGuid/ResaleUnits
The sample below will delete an existing Resale Unit, identified by the ID.
JSON:
{
"Id": 1,
}
XML:
<ResaleUnit xmlns="http://delivergo.net/portal/api">
<Id>1</Id>
</ResaleUnit>