Skip to main content

1E SDK

ProductPacks

Entity - Product Packs

Verb

Request

Notes

Permissions required

POST

/Consumer/ProductPacks

Uploads a product pack or xml instruction file without assigning any uploaded instructions to an instruction set (which makes them unusable until an administrator assigns them).

Requires 'Add' permission on instruction Set management

POST

/Consumer/ProductPacks/ InstructionSet/Id/{id}

Minimum API version - 3.1

Uploads a product pack or xml instruction file and assigns all uploaded instructions to a specific instruction set (specified by its {id}).

Requires 'Add' permission on instruction Set management

GET

/Consumer/ProductPacks /{ProductPackId}

REMOVED IN API VERSION 3.1

Get a single Product Pack

Example Response

{
    "Id": 27,
    "Name": "Security Pack",
    "Description": "For securing all the things, securely.",
    "Icon": "iVBORw0KGgoAAA..............................ErkJggg==",
    "Version": 2,
    "UploadTimestampUtc": "2015-08-14T09:29:43.707"
}
  • Read

Returns Unauthorized (401) if user does not have the required permissions.

GET

/Consumer/ProductPacks

REMOVED IN API VERSION 3.1

Get all the available Product Packs

  • Read

Returns Unauthorized (401) if user does not have the required permissions.

GET

/Consumer/ProductPacks /Name/{name}

REMOVED IN API VERSION 3.1

Get a single product pack by its name.

  • Read

Returns Unauthorized (401) if user does not have the required permissions.

POST

/Consumer/ProductPacks

DOCUMENTATION FOR VERSION 3.1 AND ONWARDS

Uploads a single file, either an xml file with an instruction definition or a zip file containing multiple instruction definitions each in a separate xml file.

Upload is done in a single transaction and entire process fails if any of the stages fail:

  • Instruction definitions are verified and resources extracted from instruction definitions

  • New entries in Instruction Definition table are created

  • Task groups and Tasks are created

  • Resources are sent to background API(s)

DOCUMENTATION FOR VERSIONS PRIOR TO 3.1

Upload a single Product Pack zip file,which includes an XML manifest to define and validate the payload.

Optional query string parameter - force, can be used to force update of an existing product pack that has instructions in progress. If this flag is absent the upload will fail if the product pack that is supposed to be updated has instructions in progress. To force an update use:

/Consumer/ProductPacks?force=true

The following actions are performed, with termination of the upload if any stages fail:

  • The Product Pack file resources are posted to the URL of each registered Background Channel.

  • A new Product Pack table entry is created, this includes an Product Pack icon for UI use.

  • New questions and actions are added to the Question Definition table, referencing the new Product Pack Id.

  • New file resources are added as Product Pack Resource table entries, again referencing the new Product Pack Id.

Note: When uploading the Product Pack via Postman ensure there are no Headers and Body just contains form-data and File is uploaded with Key=Filename

  • Add

Returns Unauthorized (401) if user does not have the required permissions.

DELETE

/Consumer/ProductPacks /{ProductPackId}

REMOVED IN API VERSION 3.1

Remove a single Product Pack. This includes the following actions:

  • The Product Pack file resources are deleted from each registered Background Channel, by DELETE sent to each URL.

  • The file resources associated with this Product Pack Id are deleted from the Product Pack Resource table.

  • Questions and actions associated with this Product Pack Id are deleted from the Question Definition table.

  • The Product Pack table entry for this Product Pack Id is deleted.

If there are instructions in progress based on definitions that came from the pack you want to delete, an error will be returned. You can force the deletion and cancel those instructions by using the optional force query string parameter like so:

/Consumer/ProductPacks /{ProductPackId}?force=true

  • Delete

Returns Unauthorized (401) if user does not have the required permissions.

GET

/Consumer/ProductPacks/ {ProductPackId}/Content

REMOVED IN API VERSION 3.1

Download saved product pack's contents as ZIP file. If no content found, NO CONTENT (204) HTTP response status is returned.

  • Read

Returns Unauthorized (401) if user does not have the required permissions.

GET

/Consumer/ProductPacks/ {id}/Icon

REMOVED IN API VERSION 3.1

Gets a Product Pack's icon in binary format.

None