GET api/purchaseforcode/{sessionID}/{code}

Получает описание товара по коду

Request Information

URI Parameters

NameDescriptionTypeAdditional information
sessionID

ID сессии (получается при логине)

string

Required

code

Код

string

Required

Body Parameters

None.

Response Information

Resource Description

PurchaseResponse
NameDescriptionTypeAdditional information
retval

Код возврата (0 - ок, иначе - ошибка)

integer

None.

desc

Текстовая расшифровка кода возврата (описание ошибки)

string

None.

purchase

Описание товара

Purchase

None.

Response Formats

application/json, text/json

Sample:
{
  "retval": 1,
  "desc": "sample string 2",
  "purchase": {
    "name": "sample string 1",
    "itemID": 2,
    "amount": 3.0,
    "currType": "sample string 4",
    "dateInv": "sample string 5",
    "feedback": "sample string 6",
    "comment": "sample string 7",
    "rating": 8,
    "state": 9,
    "id": 10,
    "invState": 11,
    "payState": 12,
    "units": "sample string 13",
    "rest": 14,
    "dayLock": 15,
    "lockState": 16,
    "fields": [
      {
        "OptionName": "sample string 1",
        "VariantName": "sample string 2",
        "Price": 3.0,
        "PriceDesc": "sample string 4",
        "PriceAction": "sample string 5",
        "PriceIndex": "sample string 6",
        "UserData": "sample string 7"
      },
      {
        "OptionName": "sample string 1",
        "VariantName": "sample string 2",
        "Price": 3.0,
        "PriceDesc": "sample string 4",
        "PriceAction": "sample string 5",
        "PriceIndex": "sample string 6",
        "UserData": "sample string 7"
      }
    ],
    "extInfo": {
      "Code": "sample string 1",
      "ExtInfo": "sample string 2",
      "Email": "sample string 3",
      "Phone": "sample string 4",
      "Skype": "sample string 5",
      "WhatsApp": "sample string 6",
      "IsChecked": 7
    }
  }
}

application/xml, text/xml

Sample:
<purchase.response>
  <retval>1</retval>
  <desc>sample string 2</desc>
  <purchase>
    <name>sample string 1</name>
    <itemID>2</itemID>
    <amount>3</amount>
    <currType>sample string 4</currType>
    <dateInv>sample string 5</dateInv>
    <feedback>sample string 6</feedback>
    <comment>sample string 7</comment>
    <rating>8</rating>
    <state>9</state>
    <id>10</id>
    <invState>11</invState>
    <payState>12</payState>
    <units>sample string 13</units>
    <rest>14</rest>
    <dayLock>15</dayLock>
    <lockState>16</lockState>
    <fields>
      <field>
        <optionname>sample string 1</optionname>
        <variantname>sample string 2</variantname>
        <price>3</price>
        <pricedesc>sample string 4</pricedesc>
        <priceaction>sample string 5</priceaction>
        <priceindex>sample string 6</priceindex>
        <userdata>sample string 7</userdata>
      </field>
      <field>
        <optionname>sample string 1</optionname>
        <variantname>sample string 2</variantname>
        <price>3</price>
        <pricedesc>sample string 4</pricedesc>
        <priceaction>sample string 5</priceaction>
        <priceindex>sample string 6</priceindex>
        <userdata>sample string 7</userdata>
      </field>
    </fields>
    <extInfo>
      <code>sample string 1</code>
      <extinfo>sample string 2</extinfo>
      <email>sample string 3</email>
      <phone>sample string 4</phone>
      <skype>sample string 5</skype>
      <whatsapp>sample string 6</whatsapp>
      <ischecked>7</ischecked>
    </extInfo>
  </purchase>
</purchase.response>