Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this page:

...

  1. the return value is the HTTP Status code of the response. API executes this operation asynchronously. Every time the client invokes the method, it returns a code. If this code tells that the operations are still in progress the resource returns an 202 Accepted status code; otherwise returns a 200 OK status code. If an error occurred it returns 500 Internal Server Error.

  2. the client can invoke the resource as many times as it wants.

Get retailer's customer account status

...

Description

Add package to retailer's customer account

HTTP Method

POST

URL

Code Block
https://services.mailup.com/API/v1.1/Rest/RetailerService.svc/Account/{id_Account}

JSON request (example)

Expand

Incremental:

Code Block
{
	"Quantity":-3,
	"WorkMode":"incremental"
}

Absolute:

Code Block
{
	"Quantity":3,
	"WorkMode":"absolute"
}

JSON response (example)

Expand
Code Block
{
	"Code":0,
	"Description":"Ok"
}

The resource returns a 200 OK status code if the package was added succesfully and the response contains code = 0; if the addition does not end propertly, the resource returns a 403 Forbidden and the response contains:

CodeDescriptionMeaning
1

Quantity limits exceeded

The number of packages you are trying to add/remove exceeds the profile limits

2

Profile rules error

3

Invalid quantity

4

Invalid workmode

 

 

 

The number of packages you are trying to add/remove exceeds some profile rule limit (for example, you cannot remove a package related to SMS)

3

Invalid quantity

This error condition appears when the work mode equals to “absolute” and the quantity value is negative

4

Invalid workmode

The WorkMode field should be “incremental” or “absolute” ONLY


 

 

 

Paging and filtering (example)

none

...

HTTP Status CodeWhenMessage
400 BadRequestIdPack is not numericInvalid pack.
ExternalUserId empty.Invalid ExternalUserId.
ExternalUserId validation fails

Note

  1. Non si possono  aggiungere/rimuovere pacchetti ad un profilo TRIAL
  2. Non di possono rimuovere pacchetti a consumo dai profili Economy e Premium
  3. La tabella RetailerProfilePack definisce il numero di pacchetti Massimo e Minimo previsti per il profilo. La visibilità del pacchetto per l'utente finale (e quindi la sua attivabilità) è gestita con il campo IsActivable.
  4. Nel caso la risposta abbia lo status code settato a 403 Forbidden si ottiene la risposta con Code=1 quando la richiesta non viene validata dai limiti previsti dalla tabella RetailerProfilePack, mentre Code=2 quando la validazione secondo i limiti della tabella retailerProfilePack è ok ma fallisce l'operazione lato ADM. Un caso in cui può essere ritornato Code=2 è quando s cerca di cancellare un pacchetto a consumo (crediti).It is impossible to remove packages from TRIAL profile
  5. It is impossible to remove credits-related packages

Anchor
GetLogins
GetLogins
Get retailer's customer account logins

...