GET api/OwnedProduct/{handle}?user={user}

Get an object and it's products using object handle

Request Information

URI Parameters

NameDescriptionTypeAdditional information
handle

object handle

string

Required

user

user handle

string

None.

Body Parameters

None.

Response Information

Resource Description

Owned product on success
Collection of errors on failure
Return codes
200 - ok
400 - bad request
401 - unauthorized
404 - not found
500 - internal server error

OwnedProduct
NameDescriptionTypeAdditional information
Handle

Object handle

string

None.

ParentHandle

Parent Object handle

string

None.

Name

Object name

string

None.

Class

Object class

string

None.

StatusID

integer

None.

Status

Object status

string

None.

CreDate

Created date

date

None.

ExpDate

Expiry date

date

None.

TransferInDate

Trandsfer in date

date

None.

ProductId

Id of the principal product

integer

None.

Quantity

Current quantity

integer

None.

ContactTypes

The contact types that associate the user to this object

Collection of string

None.

Products

Products associated with this object

Collection of ProductDetail

None.

Children

OwnedProducts that are children of this object

Collection of OwnedProduct

None.

Error

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Handle": "some1",
  "ParentHandle": null,
  "Name": "somedomain.com",
  "Class": "mail",
  "StatusID": 0,
  "Status": "NONE",
  "CreDate": "2019-12-04T00:00:00",
  "ExpDate": "2020-12-04T00:00:00",
  "TransferInDate": null,
  "ProductId": 31001,
  "Quantity": 1,
  "ContactTypes": [
    "A",
    "B"
  ],
  "Products": [
    {
      "Id": 31001,
      "Name": "Compte Mail",
      "Type": "Mail",
      "SubType": "Creation",
      "TransactionId": "NBAY-API-000000001",
      "Active": false
    }
  ],
  "Children": [
    {
      "Handle": "some2",
      "ParentHandle": null,
      "Name": "someone@somedomain.com",
      "Class": "mailbox",
      "StatusID": 0,
      "Status": "NONE",
      "CreDate": "2019-12-05T00:00:00",
      "ExpDate": null,
      "TransferInDate": null,
      "ProductId": null,
      "Quantity": null,
      "ContactTypes": null,
      "Products": null,
      "Children": null,
      "Error": null
    }
  ],
  "Error": null
}

application/xml, text/xml

Sample:
<OwnedProduct xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models">
  <Children>
    <OwnedProduct>
      <Children i:nil="true" />
      <Class>mailbox</Class>
      <ContactTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
      <CreDate>2019-12-05T00:00:00</CreDate>
      <Error i:nil="true" />
      <ExpDate i:nil="true" />
      <Handle>some2</Handle>
      <Name>someone@somedomain.com</Name>
      <ParentHandle i:nil="true" />
      <ProductId i:nil="true" />
      <Products i:nil="true" />
      <Quantity i:nil="true" />
      <Status>NONE</Status>
      <StatusID>0</StatusID>
      <TransferInDate i:nil="true" />
    </OwnedProduct>
  </Children>
  <Class>mail</Class>
  <ContactTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>A</d2p1:string>
    <d2p1:string>B</d2p1:string>
  </ContactTypes>
  <CreDate>2019-12-04T00:00:00</CreDate>
  <Error i:nil="true" />
  <ExpDate>2020-12-04T00:00:00</ExpDate>
  <Handle>some1</Handle>
  <Name>somedomain.com</Name>
  <ParentHandle i:nil="true" />
  <ProductId>31001</ProductId>
  <Products>
    <ProductDetail>
      <Active>false</Active>
      <Id>31001</Id>
      <Name>Compte Mail</Name>
      <SubType>Creation</SubType>
      <TransactionId>NBAY-API-000000001</TransactionId>
      <Type>Mail</Type>
    </ProductDetail>
  </Products>
  <Quantity>1</Quantity>
  <Status>NONE</Status>
  <StatusID>0</StatusID>
  <TransferInDate i:nil="true" />
</OwnedProduct>