PUT api/Panier/{panier}/Item/{id}?user={user}
Update an existing item on a panier
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| panier |
Panier id |
integer |
Required |
| id |
Item id |
integer |
Required |
| user |
User handle |
string |
Required |
Body Parameters
Item to update
Item| Name | Description | Type | Additional information |
|---|---|---|---|
| Id |
Item id. Use for updating, deleting |
integer |
None. |
| ProduitID |
Product id. Corresponds to Id property of the product |
integer |
Required |
| Period |
No of years |
decimal number |
Required |
| Quantity |
Quantity. Some products have a quantity instead of a period |
integer |
Required |
| Pu |
Unit price. Readonly |
decimal number |
None. |
| Confirm |
Set this to true along with other items in the panier and update the panier to create a transaction |
boolean |
None. |
| IsUpdate |
Set this to true if this is an update to an existing product. Default false. |
boolean |
None. |
| NewQuantity |
The sum of the existing quantity and quantity requested. Updates only |
integer |
None. |
| PeriodLeft |
The period from now till current expiry date. Updates only |
decimal number |
None. |
| OldProduitID |
The previous product id in case of upgrade |
integer |
None. |
| OldPu |
Old unit price in case of upgrade. This is the unit price that was paid at the time of purchase |
decimal number |
None. |
| Total_HT |
The total price of the item before tax. Quanity*Period*Pu for creation NewQuantity*Period*Pu + Quantity(if greater than 0)*PeriodLeft*Pu for updates |
decimal number |
None. |
| Attributes |
Attributes of the item. Some of these need to be provided, some have defaults, some are optional. |
Dictionary of string [key] and string [value] |
None. |
Request Formats
application/json, text/json
{
"Id": 0,
"ProduitID": 51,
"Period": 1.0,
"Quantity": 1,
"Pu": 0.0,
"Confirm": false,
"IsUpdate": false,
"NewQuantity": null,
"PeriodLeft": null,
"OldProduitID": null,
"OldPu": null,
"Total_HT": 0.0,
"Attributes": {
"domain": "adomain.com",
"ns1": "nx1",
"ns2": "nx2"
}
}
application/xml, text/xml
<Item xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models">
<Attributes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>domain</d2p1:Key>
<d2p1:Value>adomain.com</d2p1:Value>
</d2p1:KeyValueOfstringstring>
<d2p1:KeyValueOfstringstring>
<d2p1:Key>ns1</d2p1:Key>
<d2p1:Value>nx1</d2p1:Value>
</d2p1:KeyValueOfstringstring>
<d2p1:KeyValueOfstringstring>
<d2p1:Key>ns2</d2p1:Key>
<d2p1:Value>nx2</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</Attributes>
<Confirm>false</Confirm>
<Id>0</Id>
<IsUpdate>false</IsUpdate>
<NewQuantity i:nil="true" />
<OldProduitID i:nil="true" />
<OldPu i:nil="true" />
<Period>1</Period>
<PeriodLeft i:nil="true" />
<ProduitID>51</ProduitID>
<Pu>0</Pu>
<Quantity>1</Quantity>
<Total_HT>0</Total_HT>
</Item>
application/x-www-form-urlencoded
Response Information
Resource Description
The modified panier on success
Collection of errors on failure
Return codes
200 - ok
400 - bad request
401 - unauthorized
404 - not found
500 - internal server error
510 - object does not exist
511 - object has expired
512 - object parent does not exist
514 - object product incorrect
515 - invalid status
516 - parent product not in command
520 - missing required attribute
525 - object already registered
530 - invalid attribute value
531 - domain is not catchable
532 - domain is not available
533 - domain is not restorable
551 - duplicate entry
552 - object name and object handle mismatch
570 - object status does not allow for operation
572 - operation not allowed for this TLD
700 - Invalid request
706 - Unexpected error
722 - CSR is invalid
733 - Wildcards not allowed
734 - Domain name must be idn
735 - Must be a sub-domain
736 - CSR san limit exceeded
737 - Contact is missing required attribute
738 - CSR san mismatch
739 - CN does not match domain
740 - Must be a wildcard
| Name | Description | Type | Additional information |
|---|---|---|---|
| UserHandle |
Handle of the current user |
string |
None. |
| UserId |
Id of the current user |
decimal number |
None. |
| Messenger | Messenger |
None. |
|
| Errors | Collection of Error |
None. |
|
| IpAddress |
Client ip address |
string |
None. |
| Currency | string |
None. |
|
| Id |
Panier id. Use for adding, deleting items and updating panier |
integer |
None. |
| TransactionID |
Transaction id of the transaction that was created when the panier was confirmed. This is normally empty |
string |
None. |
| ModePaiementID | integer |
None. |
|
| OpState | byte |
None. |
|
| Total_HT |
Total price before tax for the panier. Readonly |
decimal number |
None. |
| Total_TTC |
Total price with tax. Readonly |
decimal number |
None. |
| Items |
The items contained in the panier |
Collection of Item |
None. |
Response Formats
application/json, text/json
{
"UserHandle": "AA111111",
"UserId": 11111.0,
"Messenger": null,
"Errors": [],
"IpAddress": null,
"Currency": null,
"Id": 0,
"TransactionID": null,
"ModePaiementID": 3,
"OpState": 1,
"Total_HT": 10.0,
"Total_TTC": 12.0,
"Items": [
{
"Id": 0,
"ProduitID": 51,
"Period": 1.0,
"Quantity": 1,
"Pu": 10.0,
"Confirm": false,
"IsUpdate": false,
"NewQuantity": null,
"PeriodLeft": null,
"OldProduitID": null,
"OldPu": null,
"Total_HT": 0.0,
"Attributes": {
"domain": "adomain.com",
"ns1": "nx1",
"ns2": "nx2"
}
}
]
}