POST api/barcodetypeapi/add?siteId={siteId}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

BarcodeTypeViewModel
NameDescriptionTypeAdditional information
descriptions

Dictionary of string [key] and string [value]

None.

id

globally unique identifier

None.

code

integer

Required

technical_description

string

Required

String length: inclusive between 0 and 100

active

boolean

Required

Request Formats

application/json, text/json

Sample:
{
  "descriptions": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "id": "0191791a-45c0-45b6-ac56-809bbfe9f1be",
  "code": 2,
  "technical_description": "sample string 3",
  "active": true
}

application/xml, text/xml

Sample:
<barcodetype xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <active>true</active>
  <code>2</code>
  <id>0191791a-45c0-45b6-ac56-809bbfe9f1be</id>
  <technical_description>sample string 3</technical_description>
  <descriptions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </descriptions>
</barcodetype>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'BarcodeTypeViewModel'.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"57c6ec03-0f91-4065-b2af-5650cf38fbb5"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">57c6ec03-0f91-4065-b2af-5650cf38fbb5</guid>