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:

CodeDescription
1

Quantity limits exceeded

2

Profile rules error

3

Invalid quantity

4

Invalid workmode


 

 

 

Paging and filtering (example)

none

...

  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).

...

Get retailer's customer

...

account logins

The resource allows to retrieve the logins available for this account/console. It is necessary if the reseller retailer allows his customers to add more administrators to an account.

Http verb
Status
colourGreen
titleGET
Resource URLAccount/{id_Account}/Login
Request API RequiredWhere
id_AccountX

URL

Request ADM-
Return value

A list of AccountLogin object containing:

  • idLogin
  • Username

NOTE: data come from Newsletters_Login table. idLogin is the id and UserName is the username fields

...

Description

Unprovide a retailer's customer account

HTTP Method

GET

URL

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

JSON request (example)

none

JSON response (example)

Expand
Code Block
{
	"IsPaginated":false,
	"Items":[
		{
			"IdLogin":45792,
			"Username":"user1"
		},
		{
			"IdLogin":45793,
			"Username":"user2"
		}],
	"PageNumber":0,
	"PageSize":20,
	"Skipped":0,
	"TotalElementsCount":2
}

Paging and filtering (example)

https://services.mailup.com/API/v1.1/Rest/RetailerService.svc/Account/{id_Account}/Login?PageSize=2&PageNumber=1

Errors

HTTP Status CodeWhenMessage
400 BadRequestExternalUserId empty.Invalid ExternalUserId.
ExternalUserId validation fails

...

HTTP Status CodeWhenMessage
400 BadRequestExternalUserId empty.Invalid ExternalUserId.
ExternalUserId validation fails

 

...