POST api/sticker/upsert

Request Information

URI Parameters

None.

Body Parameters

StickerViewModel
NameDescriptionTypeAdditional information
descriptions

Dictionary of string [key] and string [value]

None.

type

StickerTypeViewModel

None.

relations

Collection of StickerRelationViewModel

None.

details

Collection of StickerDetailViewModel

None.

active

boolean

Required

code

string

Required

Max length: 50

id

globally unique identifier

None.

stickerType_ID

globally unique identifier

Required

stickerRelation_IDs

Collection of globally unique identifier

None.

site_ID

globally unique identifier

Required

Request Formats

application/json, text/json

Sample:
{
  "descriptions": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "type": {
    "descriptions": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "code": "sample string 1",
    "id": "0ff01168-673a-4099-96e3-3c48e35a9d69",
    "technicalDescription": "sample string 3",
    "active": true
  },
  "relations": [
    {
      "active": true,
      "contract_ID": "ec284705-497d-438d-bd01-be94fa16d6aa",
      "contractItem_ID": "f085db80-5443-4650-8136-7703c579cb9a",
      "departement_ID": "3404cabb-5200-4e3b-aa71-efd384604071",
      "departmentItem_ID": "a9c0e5e4-7884-4f64-9c0f-7984b736cd1a",
      "iD": "e248f3e7-0256-4047-80a9-04b1b03ae659",
      "site_ID": "e12559f6-8e26-414c-b8eb-27bfd8a08b67",
      "siteCustomer_ID": "27db9995-6ec6-47ff-832a-021b3801dff2",
      "sticker_ID": "1fcbd1cf-a04f-4d8a-9d77-07446b7c7f46"
    },
    {
      "active": true,
      "contract_ID": "ec284705-497d-438d-bd01-be94fa16d6aa",
      "contractItem_ID": "f085db80-5443-4650-8136-7703c579cb9a",
      "departement_ID": "3404cabb-5200-4e3b-aa71-efd384604071",
      "departmentItem_ID": "a9c0e5e4-7884-4f64-9c0f-7984b736cd1a",
      "iD": "e248f3e7-0256-4047-80a9-04b1b03ae659",
      "site_ID": "e12559f6-8e26-414c-b8eb-27bfd8a08b67",
      "siteCustomer_ID": "27db9995-6ec6-47ff-832a-021b3801dff2",
      "sticker_ID": "1fcbd1cf-a04f-4d8a-9d77-07446b7c7f46"
    }
  ],
  "details": [
    {
      "stickerField": {
        "previewValue": {
          "sample string 1": "sample string 2",
          "sample string 3": "sample string 4"
        },
        "descriptions": {
          "sample string 1": "sample string 2",
          "sample string 3": "sample string 4"
        },
        "active": true,
        "code": "sample string 2",
        "id": "94173b4d-0985-4fd1-aaef-acef33575d50",
        "isStatic": true,
        "stickerType_ID": "0dbae625-356a-41cd-8c40-06ffeebedcf8",
        "technicalDescription": "sample string 6"
      },
      "active": true,
      "backgroundColor": "sample string 2",
      "bold": true,
      "fontSize": 4,
      "foregroundColor": "sample string 5",
      "id": "3a09734b-3550-4839-8230-8dd18b7010d3",
      "italic": true,
      "staticValue": "sample string 8",
      "sticker_ID": "3f324a7a-5a9a-469d-ab11-871ea94380a4",
      "stickerField_ID": "a4a973df-2fe5-4752-9444-af80072266d8",
      "stringLength": 1,
      "stringStart": 1,
      "zoneNumber": 11
    },
    {
      "stickerField": {
        "previewValue": {
          "sample string 1": "sample string 2",
          "sample string 3": "sample string 4"
        },
        "descriptions": {
          "sample string 1": "sample string 2",
          "sample string 3": "sample string 4"
        },
        "active": true,
        "code": "sample string 2",
        "id": "94173b4d-0985-4fd1-aaef-acef33575d50",
        "isStatic": true,
        "stickerType_ID": "0dbae625-356a-41cd-8c40-06ffeebedcf8",
        "technicalDescription": "sample string 6"
      },
      "active": true,
      "backgroundColor": "sample string 2",
      "bold": true,
      "fontSize": 4,
      "foregroundColor": "sample string 5",
      "id": "3a09734b-3550-4839-8230-8dd18b7010d3",
      "italic": true,
      "staticValue": "sample string 8",
      "sticker_ID": "3f324a7a-5a9a-469d-ab11-871ea94380a4",
      "stickerField_ID": "a4a973df-2fe5-4752-9444-af80072266d8",
      "stringLength": 1,
      "stringStart": 1,
      "zoneNumber": 11
    }
  ],
  "active": true,
  "code": "sample string 2",
  "id": "a99c58b8-6e4e-440b-ba68-6675e6d15632",
  "stickerType_ID": "cbc84f20-40e6-4fbc-b577-731f789ccda6",
  "stickerRelation_IDs": [
    "fa24988f-d505-4fa6-a19e-b5372608f8d9",
    "76b263d2-55f2-43f2-b8fa-06ecad4e4a5d"
  ],
  "site_ID": "04f101b7-16f6-45af-bfa6-a4b76e7208e8"
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'EntityModel.StickerDetailViewModel' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'EntityModel.StickerDetailViewModel' contains cycles and cannot be serialized if reference tracking is disabled.

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 'StickerViewModel'.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"dc0fc122-3270-417d-9eb2-01fcb71e9d7c"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">dc0fc122-3270-417d-9eb2-01fcb71e9d7c</guid>