PUT api/Panier/{id}
Update a panier with the given id. Confirmed items will be used to create a transaction, unconfirmed items will be placed in a new panier. All supplied items will be updated, new items (id empty) will be added. Any items that are not present in the posted panier will be untouched, to remove items from the panier use the delete method.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id |
Panier id |
integer |
Required |
Body Parameters
Panier that should be updated
UpdatePanierName | Description | Type | Additional information |
---|---|---|---|
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. |
Request Formats
application/json, text/json
{ "Errors": [ { "Code": 1, "Detail": "sample string 2", "Data": {} } ], "IpAddress": "sample string 3", "Currency": "sample string 4", "Id": 5, "TransactionID": "sample string 6", "ModePaiementID": 7, "OpState": 64, "Total_HT": 9.0, "Total_TTC": 10.0, "Items": [ { "Id": 1, "ProduitID": 1, "Period": 1.1, "Quantity": 1, "Pu": 2.0, "Confirm": true, "IsUpdate": true, "NewQuantity": 1, "PeriodLeft": 1.1, "OldProduitID": 1, "OldPu": 1.0, "Total_HT": 5.0, "Attributes": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" } } ] }
application/xml, text/xml
<UpdatePanier xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models"> <Currency>sample string 4</Currency> <Errors> <Error> <Code>1</Code> <Data /> <Detail>sample string 2</Detail> </Error> </Errors> <Id>5</Id> <IpAddress>sample string 3</IpAddress> <Items> <Item> <Attributes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringstring> <d4p1:Key>sample string 1</d4p1:Key> <d4p1:Value>sample string 2</d4p1:Value> </d4p1:KeyValueOfstringstring> <d4p1:KeyValueOfstringstring> <d4p1:Key>sample string 3</d4p1:Key> <d4p1:Value>sample string 4</d4p1:Value> </d4p1:KeyValueOfstringstring> </Attributes> <Confirm>true</Confirm> <Id>1</Id> <IsUpdate>true</IsUpdate> <NewQuantity>1</NewQuantity> <OldProduitID>1</OldProduitID> <OldPu>1</OldPu> <Period>1.1</Period> <PeriodLeft>1.1</PeriodLeft> <ProduitID>1</ProduitID> <Pu>2</Pu> <Quantity>1</Quantity> <Total_HT>5</Total_HT> </Item> </Items> <ModePaiementID>7</ModePaiementID> <OpState>64</OpState> <Total_HT>9</Total_HT> <Total_TTC>10</Total_TTC> <TransactionID>sample string 6</TransactionID> <UserHandle>sample string 1</UserHandle> <UserId>2</UserId> </UpdatePanier>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
Returns a response object that contains a panier and a transcation 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 |
---|---|---|---|
Panier |
When confirming items in a panier, this will be a new panier with any remaining items in it. For simple updates this will be the updated panier. |
Panier |
None. |
OriginalPanierId |
The id of the panier that when updated caused this panier and transaction to be created |
integer |
None. |
Transaction |
When confirming items in a panier, this will be the transaction that was generated by the confirmed items. |
Transaction |
None. |
Response Formats
application/json, text/json
{ "Panier": { "UserHandle": "sample string 1", "UserId": 2.0, "Errors": [ { "Code": 1, "Detail": "sample string 2", "Data": {} } ], "IpAddress": "sample string 3", "Currency": "sample string 4", "Id": 5, "TransactionID": "sample string 6", "ModePaiementID": 7, "OpState": 64, "Total_HT": 9.0, "Total_TTC": 10.0, "Items": [ { "Id": 1, "ProduitID": 1, "Period": 1.1, "Quantity": 1, "Pu": 2.0, "Confirm": true, "IsUpdate": true, "NewQuantity": 1, "PeriodLeft": 1.1, "OldProduitID": 1, "OldPu": 1.0, "Total_HT": 5.0, "Attributes": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" } } ] }, "OriginalPanierId": 1, "Transaction": { "TransactionID": "sample string 1", "Total_HT": 2.0, "Total_TTC": 3.0, "PanierID": 4, "OpDetails": [ { "Id": 1.0, "ProduitID": 1, "Period": 1.1, "Quantity": 1, "Pu": 2.0, "IsUpdate": true, "NewQuantity": 1, "PeriodLeft": 1.1, "OldProduitID": 1, "OldPu": 1.0, "Total_HT": 4.0, "OpDetailPacks": [ { "Id": 1.0, "DetailId": 2.0, "ProduitID": 1, "Pu": 3.0, "CartItems": [ { "Id": 1.0, "DetailPackId": 2.0, "Name": "sample string 3", "Handle": "sample string 4", "Class": "sample string 5", "Attributes": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" } } ] } ] } ], "AutoRenew": true, "ModePaiementID": 1, "OpState": 64, "Errors": [ { "Code": 1, "Detail": "sample string 2", "Data": {} } ], "IpAddress": "sample string 8", "Currency": "sample string 9" } }
application/xml, text/xml
<PanierResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models"> <OriginalPanierId>1</OriginalPanierId> <Panier> <Currency>sample string 4</Currency> <Errors> <Error> <Code>1</Code> <Data /> <Detail>sample string 2</Detail> </Error> </Errors> <Id>5</Id> <IpAddress>sample string 3</IpAddress> <Items> <Item> <Attributes xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>sample string 1</d5p1:Key> <d5p1:Value>sample string 2</d5p1:Value> </d5p1:KeyValueOfstringstring> <d5p1:KeyValueOfstringstring> <d5p1:Key>sample string 3</d5p1:Key> <d5p1:Value>sample string 4</d5p1:Value> </d5p1:KeyValueOfstringstring> </Attributes> <Confirm>true</Confirm> <Id>1</Id> <IsUpdate>true</IsUpdate> <NewQuantity>1</NewQuantity> <OldProduitID>1</OldProduitID> <OldPu>1</OldPu> <Period>1.1</Period> <PeriodLeft>1.1</PeriodLeft> <ProduitID>1</ProduitID> <Pu>2</Pu> <Quantity>1</Quantity> <Total_HT>5</Total_HT> </Item> </Items> <ModePaiementID>7</ModePaiementID> <OpState>64</OpState> <Total_HT>9</Total_HT> <Total_TTC>10</Total_TTC> <TransactionID>sample string 6</TransactionID> <UserHandle>sample string 1</UserHandle> <UserId>2</UserId> </Panier> <Transaction xmlns:d2p1="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Transaction"> <Currency>sample string 9</Currency> <Errors> <Error> <Code>1</Code> <Data /> <Detail>sample string 2</Detail> </Error> </Errors> <IpAddress>sample string 8</IpAddress> <d2p1:ModePaiementID>1</d2p1:ModePaiementID> <d2p1:OpState>64</d2p1:OpState> <d2p1:AutoRenew>true</d2p1:AutoRenew> <d2p1:OpDetails> <d2p1:OpDetail> <d2p1:Id>1</d2p1:Id> <d2p1:IsUpdate>true</d2p1:IsUpdate> <d2p1:NewQuantity>1</d2p1:NewQuantity> <d2p1:OldProduitID>1</d2p1:OldProduitID> <d2p1:OldPu>1</d2p1:OldPu> <d2p1:OpDetailPacks> <d2p1:OpDetailPack> <d2p1:CartItems> <d2p1:CartItem> <d2p1:Attributes xmlns:d9p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d9p1:KeyValueOfstringstring> <d9p1:Key>sample string 1</d9p1:Key> <d9p1:Value>sample string 2</d9p1:Value> </d9p1:KeyValueOfstringstring> <d9p1:KeyValueOfstringstring> <d9p1:Key>sample string 3</d9p1:Key> <d9p1:Value>sample string 4</d9p1:Value> </d9p1:KeyValueOfstringstring> </d2p1:Attributes> <d2p1:Class>sample string 5</d2p1:Class> <d2p1:DetailPackId>2</d2p1:DetailPackId> <d2p1:Handle>sample string 4</d2p1:Handle> <d2p1:Id>1</d2p1:Id> <d2p1:Name>sample string 3</d2p1:Name> </d2p1:CartItem> </d2p1:CartItems> <d2p1:DetailId>2</d2p1:DetailId> <d2p1:Id>1</d2p1:Id> <d2p1:ProduitID>1</d2p1:ProduitID> <d2p1:Pu>3</d2p1:Pu> </d2p1:OpDetailPack> </d2p1:OpDetailPacks> <d2p1:Period>1.1</d2p1:Period> <d2p1:PeriodLeft>1.1</d2p1:PeriodLeft> <d2p1:ProduitID>1</d2p1:ProduitID> <d2p1:Pu>2</d2p1:Pu> <d2p1:Quantity>1</d2p1:Quantity> <d2p1:Total_HT>4</d2p1:Total_HT> </d2p1:OpDetail> </d2p1:OpDetails> <d2p1:PanierID>4</d2p1:PanierID> <d2p1:Total_HT>2</d2p1:Total_HT> <d2p1:Total_TTC>3</d2p1:Total_TTC> <d2p1:TransactionID>sample string 1</d2p1:TransactionID> </Transaction> </PanierResponse>