Opero Docs
Opero APIcompanies

Archive service catalog item

PATCH
/v1/companies/{companyId}/service-catalog/items/{id}/archive

Archives an active service catalog item. Repeating the call for an already archived item returns the archived item without a second state change.

Authorization

api-token
AuthorizationBearer <token>

Opero API token. Send it as Authorization: Bearer ek_...

In: header

Path Parameters

id*string
companyId*unknown

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/companies/{companyId}/service-catalog/items/string/archive"
{  "data": {    "id": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "code": "string",    "name": "string",    "description": "string",    "categoryKey": "string",    "type": "SERVICE",    "usage": "COST",    "status": "ACTIVE",    "unitsDictionaryId": "string",    "defaultUnitDictionaryEntryId": "string",    "defaultUnitOption": {      "id": "string",      "key": "string",      "label": "string",      "multiplier": "string",      "position": 0,      "isActive": true    },    "unitOptions": [      {        "id": "string",        "key": "string",        "label": "string",        "multiplier": "string",        "position": 0,        "isActive": true      }    ],    "defaultPurchaseVatRateCode": "string",    "defaultSalesVatRateCode": "string",    "gtuCode": "string",    "ksefProcedureCode": "string",    "cnCode": "string",    "cnVersion": "string",    "pkwiuCode": "string",    "pkwiuVersion": "string",    "procedureMarkers": [      "string"    ],    "costAccountCode": "string",    "salesAccountCode": "string",    "inventoryAccountCode": "string",    "defaultMpk": "string",    "salesBasePrice": "string",    "salesCurrencyCode": "string",    "isDiscountable": true,    "defaultSplitPattern": "PROPORTIONAL",    "customFields": [      {        "reference": {          "ownership": "SUBORDINATE",          "cardinality": "ONE_TO_ONE"        },        "fieldDefinitionId": "string",        "key": "string",        "name": "string",        "type": "LINES",        "validationConfig": {},        "presentation": {          "fileImage": {            "imageMode": "full",            "objectFit": "cover",            "objectPosition": "center"          }        },        "dictionaryId": "string",        "customObjectModuleId": "string",        "customObjectId": "string",        "customObjectModuleKey": "string",        "customObjectKey": "string",        "value": {          "id": "string",          "version": 0,          "entries": [            {              "id": "string",              "clientId": "string",              "serviceCatalogItemId": "string",              "unitDictionaryEntryId": "string",              "name": "string",              "description": "string",              "quantity": "1.000000",              "unit": "service",              "unitNetPrice": "100.0000",              "discountPercent": "10.0000",              "discountAmount": "25.0000",              "taxRateCode": "23",              "taxRatePercent": "23.0000",              "taxAmountOverride": "23.0000",              "gtuCode": "GTU_01",              "ksefProcedureCode": "WSTO_EE",              "cnCode": "string",              "pkwiuCode": "string",              "exciseAmount": "12.34",              "sourceType": "MANUAL",              "revision": 0,              "hasBillingHistory": true,              "position": 0,              "currencyCode": "string",              "netAmount": "string",              "taxAmount": "string",              "grossAmount": "string",              "reservedQuantity": "string",              "billedQuantity": "string",              "availableQuantity": "string",              "serviceCatalogSnapshot": {},              "warnings": [                {}              ]            }          ]        },        "mentions": [          {            "kind": "user",            "id": "string",            "label": "string",            "active": true          }        ],        "renderedValue": {          "html": "string",          "css": "string"        },        "resolvedValue": {          "id": "string",          "type": "USER",          "displayLabel": "string",          "email": "string",          "fullName": "string",          "acronym": "string"        },        "file": {          "id": "string",          "originalName": "string",          "mimeType": "string",          "sizeBytes": 0,          "createdAt": "2019-08-24T14:15:22Z",          "urlPath": "string",          "downloadPath": "string"        },        "files": [          {            "id": "string",            "originalName": "string",            "mimeType": "string",            "sizeBytes": 0,            "createdAt": "2019-08-24T14:15:22Z",            "urlPath": "string",            "downloadPath": "string"          }        ]      }    ]  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}