> For the complete documentation index, see [llms.txt](https://docs.fulfillmenttools.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fulfillmenttools.com/documentation/apis/api-reference/document-sets-core.md).

# Document Sets (Core)

Endpoints to create, update, and read document sets and files.

## Get document set

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Deprecated, use /api/documentsets/{documentSetRef} instead

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentSet":{"properties":{"created":{"description":"Creation timestamp","format":"date-time","type":"string"},"documents":{"description":"Customizable information about the lineItem that can be set during the process.","items":{"$ref":"#/components/schemas/PrintableDocument"},"maxItems":50,"type":"array"},"facilityRef":{"description":"connected facility","type":"string"},"id":{"description":"Unique identifier for the document set","type":"string"},"lastModified":{"description":"Last modification timestamp","format":"date-time","type":"string"},"version":{"description":"Version number for optimistic locking","type":"integer"}},"required":["id","lastModified","created","version"],"title":"DocumentSet","type":"object","description":"DocumentSet"},"PrintableDocument":{"properties":{"customAttributes":{"description":"Attributes that can be added to the document. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"documentCategory":{"$ref":"#/components/schemas/DocumentCategory"},"documentType":{"$ref":"#/components/schemas/DocumentType"},"id":{"type":"string"},"name":{"type":"string"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"type":"array"},"path":{"type":"string"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"}},"required":["documentType","id","status","documentCategory"],"type":"object","title":"PrintableDocument","description":"PrintableDocument"},"DocumentCategory":{"enum":["EXTERNAL","DELIVERYNOTE","RETURNNOTE","SENDLABEL","RETURNLABEL","TRANSFERLABEL","CUSTOMS"],"type":"string","title":"DocumentCategory","description":"DocumentCategory"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"DocumentOperations":{"enum":["PRINT","VIEW"],"type":"string","title":"DocumentOperations","description":"DocumentOperations"},"DocumentStatus":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string","title":"DocumentStatus","description":"DocumentStatus"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentSet/{documentSetRef}":{"get":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Deprecated, use /api/documentsets/{documentSetRef} instead","operationId":"getDocumentSetDeprecated","parameters":[{"description":"Reference to the entity you want to get","in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSet"}}},"description":"Documents were found. The results are in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get document set","tags":["Document Sets (Core)"]}}}}
```

## Create document

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Deprecated, use /api/documentsets/{documentSetRef}/documents instead

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ExternalPrintableDocumentForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"file":{"$ref":"#/components/schemas/NamedFile"},"operations":{"items":{"enum":["PRINT","VIEW"],"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"priority":{"type":"number"},"status":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string"},"type":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string"}},"required":["type"],"title":"ExternalPrintableDocumentForCreation","type":"object","description":"ExternalPrintableDocumentForCreation"},"NamedFile":{"additionalProperties":false,"properties":{"content":{"description":"File content base64 encoded","type":"string"},"name":{"description":"File name with extension","type":"string"}},"required":["name","content"],"type":"object","xml":{"name":"NamedFile"},"title":"NamedFile","description":"NamedFile"},"PrintableDocument":{"properties":{"customAttributes":{"description":"Attributes that can be added to the document. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"documentCategory":{"$ref":"#/components/schemas/DocumentCategory"},"documentType":{"$ref":"#/components/schemas/DocumentType"},"id":{"type":"string"},"name":{"type":"string"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"type":"array"},"path":{"type":"string"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"}},"required":["documentType","id","status","documentCategory"],"type":"object","title":"PrintableDocument","description":"PrintableDocument"},"DocumentCategory":{"enum":["EXTERNAL","DELIVERYNOTE","RETURNNOTE","SENDLABEL","RETURNLABEL","TRANSFERLABEL","CUSTOMS"],"type":"string","title":"DocumentCategory","description":"DocumentCategory"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"DocumentOperations":{"enum":["PRINT","VIEW"],"type":"string","title":"DocumentOperations","description":"DocumentOperations"},"DocumentStatus":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string","title":"DocumentStatus","description":"DocumentStatus"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentSet/{documentSetRef}/documents":{"post":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Deprecated, use /api/documentsets/{documentSetRef}/documents instead","operationId":"addDocumentDeprecated","parameters":[{"description":"Reference to the documentSet you want to add a file to","in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalPrintableDocumentForCreation"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintableDocument"}}},"description":"Document was found. The results are in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Create document","tags":["Document Sets (Core)"]}}}}
```

## Update document

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Deprecated, use /api/documentsets/{documentSetRef}/documents/{documentRef} instead

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PrintableDocumentForUpdate":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"operations":{"items":{"enum":["PRINT","VIEW"],"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"priority":{"type":"number"},"status":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string"},"version":{"type":"number"}},"required":["version"],"title":"PrintableDocumentForUpdate","type":"object","description":"PrintableDocumentForUpdate"},"PrintableDocument":{"properties":{"customAttributes":{"description":"Attributes that can be added to the document. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"documentCategory":{"$ref":"#/components/schemas/DocumentCategory"},"documentType":{"$ref":"#/components/schemas/DocumentType"},"id":{"type":"string"},"name":{"type":"string"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"type":"array"},"path":{"type":"string"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"}},"required":["documentType","id","status","documentCategory"],"type":"object","title":"PrintableDocument","description":"PrintableDocument"},"DocumentCategory":{"enum":["EXTERNAL","DELIVERYNOTE","RETURNNOTE","SENDLABEL","RETURNLABEL","TRANSFERLABEL","CUSTOMS"],"type":"string","title":"DocumentCategory","description":"DocumentCategory"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"DocumentOperations":{"enum":["PRINT","VIEW"],"type":"string","title":"DocumentOperations","description":"DocumentOperations"},"DocumentStatus":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string","title":"DocumentStatus","description":"DocumentStatus"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentSet/{documentSetRef}/documents/{documentRef}":{"patch":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Deprecated, use /api/documentsets/{documentSetRef}/documents/{documentRef} instead","operationId":"updateDocumentDeprecated","parameters":[{"description":"Reference to the documentSet you want to update","in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}},{"description":"Reference to the single document you want to update","in":"path","name":"documentRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintableDocumentForUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintableDocument"}}},"description":"Document was found. The results are in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Update document","tags":["Document Sets (Core)"]}}}}
```

## Get file

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentSet/{documentSetRef}/documents/{documentRef}/file":{"get":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />","operationId":"downloadDocumentDeprecated","parameters":[{"description":"Reference to the documentSet you want to download a file from","in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}},{"description":"Reference to the single document you want to download","in":"path","name":"documentRef","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The document as a stream"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get file","tags":["Document Sets (Core)"]}}}}
```

## Update file

> This part of the API is deprecated. For details please check the \<a href="<https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated>" target="\_blank">api-release-life-cycle documentation\</a>.\<br />\<br />Deprecated, use /api/documentsets/{documentSetRef}/documents/{documentRef}/file instead

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ExternalDocumentContentForUpdate":{"properties":{"documentSetVersion":{"description":"Version of documentSet to which this document belongs.","type":"number"},"file":{"$ref":"#/components/schemas/NamedFile"}},"required":["documentSetVersion","file"],"title":"ExternalDocumentContentForUpdate","type":"object","description":"ExternalDocumentContentForUpdate"},"NamedFile":{"additionalProperties":false,"properties":{"content":{"description":"File content base64 encoded","type":"string"},"name":{"description":"File name with extension","type":"string"}},"required":["name","content"],"type":"object","xml":{"name":"NamedFile"},"title":"NamedFile","description":"NamedFile"},"PrintableDocument":{"properties":{"customAttributes":{"description":"Attributes that can be added to the document. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"documentCategory":{"$ref":"#/components/schemas/DocumentCategory"},"documentType":{"$ref":"#/components/schemas/DocumentType"},"id":{"type":"string"},"name":{"type":"string"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"type":"array"},"path":{"type":"string"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"}},"required":["documentType","id","status","documentCategory"],"type":"object","title":"PrintableDocument","description":"PrintableDocument"},"DocumentCategory":{"enum":["EXTERNAL","DELIVERYNOTE","RETURNNOTE","SENDLABEL","RETURNLABEL","TRANSFERLABEL","CUSTOMS"],"type":"string","title":"DocumentCategory","description":"DocumentCategory"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"DocumentOperations":{"enum":["PRINT","VIEW"],"type":"string","title":"DocumentOperations","description":"DocumentOperations"},"DocumentStatus":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string","title":"DocumentStatus","description":"DocumentStatus"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentSet/{documentSetRef}/documents/{documentRef}/file":{"put":{"deprecated":true,"description":"This part of the API is deprecated. For details please check the <a href=\"https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/api-release-life-cycle#deprecated\" target=\"_blank\">api-release-life-cycle documentation</a>.<br /><br />Deprecated, use /api/documentsets/{documentSetRef}/documents/{documentRef}/file instead","operationId":"addContentToDocumentDeprecated","parameters":[{"description":"Reference to the documentSet you want to update","in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}},{"description":"Reference to the single document you want to update","in":"path","name":"documentRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalDocumentContentForUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintableDocument"}}},"description":"Changed Document"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Update file","tags":["Document Sets (Core)"]}}}}
```

## Get document set

> Get document set for given id

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentSet":{"properties":{"created":{"description":"Creation timestamp","format":"date-time","type":"string"},"documents":{"description":"Customizable information about the lineItem that can be set during the process.","items":{"$ref":"#/components/schemas/PrintableDocument"},"maxItems":50,"type":"array"},"facilityRef":{"description":"connected facility","type":"string"},"id":{"description":"Unique identifier for the document set","type":"string"},"lastModified":{"description":"Last modification timestamp","format":"date-time","type":"string"},"version":{"description":"Version number for optimistic locking","type":"integer"}},"required":["id","lastModified","created","version"],"title":"DocumentSet","type":"object","description":"DocumentSet"},"PrintableDocument":{"properties":{"customAttributes":{"description":"Attributes that can be added to the document. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"documentCategory":{"$ref":"#/components/schemas/DocumentCategory"},"documentType":{"$ref":"#/components/schemas/DocumentType"},"id":{"type":"string"},"name":{"type":"string"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"type":"array"},"path":{"type":"string"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"}},"required":["documentType","id","status","documentCategory"],"type":"object","title":"PrintableDocument","description":"PrintableDocument"},"DocumentCategory":{"enum":["EXTERNAL","DELIVERYNOTE","RETURNNOTE","SENDLABEL","RETURNLABEL","TRANSFERLABEL","CUSTOMS"],"type":"string","title":"DocumentCategory","description":"DocumentCategory"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"DocumentOperations":{"enum":["PRINT","VIEW"],"type":"string","title":"DocumentOperations","description":"DocumentOperations"},"DocumentStatus":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string","title":"DocumentStatus","description":"DocumentStatus"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentsets/{documentSetRef}":{"get":{"deprecated":false,"description":"Get document set for given id","operationId":"getDocumentSet","parameters":[{"in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSet"}}},"description":"Documents were found. The results are in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get document set","tags":["Document Sets (Core)"]}}}}
```

## Create document

> add new document to document set

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ExternalPrintableDocumentForCreation":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"file":{"$ref":"#/components/schemas/NamedFile"},"operations":{"items":{"enum":["PRINT","VIEW"],"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"priority":{"type":"number"},"status":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string"},"type":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string"}},"required":["type"],"title":"ExternalPrintableDocumentForCreation","type":"object","description":"ExternalPrintableDocumentForCreation"},"NamedFile":{"additionalProperties":false,"properties":{"content":{"description":"File content base64 encoded","type":"string"},"name":{"description":"File name with extension","type":"string"}},"required":["name","content"],"type":"object","xml":{"name":"NamedFile"},"title":"NamedFile","description":"NamedFile"},"PrintableDocument":{"properties":{"customAttributes":{"description":"Attributes that can be added to the document. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"documentCategory":{"$ref":"#/components/schemas/DocumentCategory"},"documentType":{"$ref":"#/components/schemas/DocumentType"},"id":{"type":"string"},"name":{"type":"string"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"type":"array"},"path":{"type":"string"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"}},"required":["documentType","id","status","documentCategory"],"type":"object","title":"PrintableDocument","description":"PrintableDocument"},"DocumentCategory":{"enum":["EXTERNAL","DELIVERYNOTE","RETURNNOTE","SENDLABEL","RETURNLABEL","TRANSFERLABEL","CUSTOMS"],"type":"string","title":"DocumentCategory","description":"DocumentCategory"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"DocumentOperations":{"enum":["PRINT","VIEW"],"type":"string","title":"DocumentOperations","description":"DocumentOperations"},"DocumentStatus":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string","title":"DocumentStatus","description":"DocumentStatus"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentsets/{documentSetRef}/documents":{"post":{"deprecated":false,"description":"add new document to document set","operationId":"addDocument","parameters":[{"in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalPrintableDocumentForCreation"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintableDocument"}}},"description":"Document was found. The results are in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Create document","tags":["Document Sets (Core)"]}}}}
```

## Update document

> Update document of document set

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PrintableDocumentForUpdate":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"operations":{"items":{"enum":["PRINT","VIEW"],"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"priority":{"type":"number"},"status":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string"},"version":{"type":"number"}},"required":["version"],"title":"PrintableDocumentForUpdate","type":"object","description":"PrintableDocumentForUpdate"},"PrintableDocument":{"properties":{"customAttributes":{"description":"Attributes that can be added to the document. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"documentCategory":{"$ref":"#/components/schemas/DocumentCategory"},"documentType":{"$ref":"#/components/schemas/DocumentType"},"id":{"type":"string"},"name":{"type":"string"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"type":"array"},"path":{"type":"string"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"}},"required":["documentType","id","status","documentCategory"],"type":"object","title":"PrintableDocument","description":"PrintableDocument"},"DocumentCategory":{"enum":["EXTERNAL","DELIVERYNOTE","RETURNNOTE","SENDLABEL","RETURNLABEL","TRANSFERLABEL","CUSTOMS"],"type":"string","title":"DocumentCategory","description":"DocumentCategory"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"DocumentOperations":{"enum":["PRINT","VIEW"],"type":"string","title":"DocumentOperations","description":"DocumentOperations"},"DocumentStatus":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string","title":"DocumentStatus","description":"DocumentStatus"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentsets/{documentSetRef}/documents/{documentRef}":{"patch":{"deprecated":false,"description":"Update document of document set","operationId":"updateDocument","parameters":[{"in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}},{"in":"path","name":"documentRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintableDocumentForUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintableDocument"}}},"description":"Document was found. The results are in the body."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Update document","tags":["Document Sets (Core)"]}}}}
```

## Get file

> Download file of document set

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentsets/{documentSetRef}/documents/{documentRef}/file":{"get":{"deprecated":false,"description":"Download file of document set","operationId":"downloadDocument","parameters":[{"in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}},{"in":"path","name":"documentRef","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"The document as a stream"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Get file","tags":["Document Sets (Core)"]}}}}
```

## Update file

> Add document content to document set

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read document sets and files.","name":"Document Sets (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ExternalDocumentContentForUpdate":{"properties":{"documentSetVersion":{"description":"Version of documentSet to which this document belongs.","type":"number"},"file":{"$ref":"#/components/schemas/NamedFile"}},"required":["documentSetVersion","file"],"title":"ExternalDocumentContentForUpdate","type":"object","description":"ExternalDocumentContentForUpdate"},"NamedFile":{"additionalProperties":false,"properties":{"content":{"description":"File content base64 encoded","type":"string"},"name":{"description":"File name with extension","type":"string"}},"required":["name","content"],"type":"object","xml":{"name":"NamedFile"},"title":"NamedFile","description":"NamedFile"},"PrintableDocument":{"properties":{"customAttributes":{"description":"Attributes that can be added to the document. These attributes cannot be used within fulfillment processes, but it could be useful to have the informations carried here.","type":"object"},"documentCategory":{"$ref":"#/components/schemas/DocumentCategory"},"documentType":{"$ref":"#/components/schemas/DocumentType"},"id":{"type":"string"},"name":{"type":"string"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"type":"array"},"path":{"type":"string"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"}},"required":["documentType","id","status","documentCategory"],"type":"object","title":"PrintableDocument","description":"PrintableDocument"},"DocumentCategory":{"enum":["EXTERNAL","DELIVERYNOTE","RETURNNOTE","SENDLABEL","RETURNLABEL","TRANSFERLABEL","CUSTOMS"],"type":"string","title":"DocumentCategory","description":"DocumentCategory"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"DocumentOperations":{"enum":["PRINT","VIEW"],"type":"string","title":"DocumentOperations","description":"DocumentOperations"},"DocumentStatus":{"enum":["AVAILABLE","LOADING","REQUESTABLE","CANCELED","WAITING_FOR_INPUT"],"type":"string","title":"DocumentStatus","description":"DocumentStatus"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/documentsets/{documentSetRef}/documents/{documentRef}/file":{"put":{"deprecated":false,"description":"Add document content to document set","operationId":"addContentToDocument","parameters":[{"in":"path","name":"documentSetRef","required":true,"schema":{"type":"string"}},{"in":"path","name":"documentRef","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalDocumentContentForUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintableDocument"}}},"description":"Changed Document"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"The requested entity was not found"}},"summary":"Update file","tags":["Document Sets (Core)"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fulfillmenttools.com/documentation/apis/api-reference/document-sets-core.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
