# 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":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"documents":{"items":{"$ref":"#/components/schemas/PrintableDocument"},"type":"array"},"facilityRef":{"type":"string"},"id":{"type":"string"}},"required":["id"],"title":"DocumentSet","description":"DocumentSet"},"VersionedResource":{"properties":{"created":{"description":"The date this entity was created at the platform. This value is generated by the service.","format":"date-time","type":"string"},"lastModified":{"description":"The date this entity was modified last. This value is generated by the service.","format":"date-time","type":"string"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["version"],"type":"object","title":"VersionedResource","description":"VersionedResource"},"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"}},"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":{"additionalProperties":false,"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"},"file":{"$ref":"#/components/schemas/NamedFile"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"minItems":1,"type":"array"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"},"type":{"$ref":"#/components/schemas/DocumentType"}},"required":["type"],"type":"object","title":"ExternalPrintableDocumentForCreation","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"},"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"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"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"},"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":"Entity 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":{"additionalProperties":false,"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"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"minItems":1,"type":"array"},"priority":{"description":"Sorting display order of document","format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/DocumentStatus"},"version":{"description":"Version of the documentSet you want to update a document of","format":"int64","type":"integer"}},"required":["version"],"type":"object","title":"PrintableDocumentForUpdate","description":"PrintableDocumentForUpdate"},"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"},"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"},"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"}}},"description":"PartialDocument","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":"Entity not found"}},"summary":"Update document","tags":["Document Sets (Core)"]}}}}
```

## GET /api/documentSet/{documentSetRef}/documents/{documentRef}/file

> Get file

```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"}}},"paths":{"/api/documentSet/{documentSetRef}/documents/{documentRef}/file":{"get":{"description":"","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"}},"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":{"additionalProperties":false,"properties":{"documentSetVersion":{"description":"Version of documentSet to which this document belongs.","type":"number"},"file":{"$ref":"#/components/schemas/NamedFile"}},"required":["file","documentSetVersion"],"type":"object","title":"ExternalDocumentContentForUpdate","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"}}},"description":"Document Content with id and version","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":"Entity not found"}},"summary":"Update file","tags":["Document Sets (Core)"]}}}}
```

## GET /api/documentsets/{documentSetRef}

> Get 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":{"DocumentSet":{"allOf":[{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"documents":{"items":{"$ref":"#/components/schemas/PrintableDocument"},"type":"array"},"facilityRef":{"type":"string"},"id":{"type":"string"}},"required":["id"],"title":"DocumentSet","description":"DocumentSet"},"VersionedResource":{"properties":{"created":{"description":"The date this entity was created at the platform. This value is generated by the service.","format":"date-time","type":"string"},"lastModified":{"description":"The date this entity was modified last. This value is generated by the service.","format":"date-time","type":"string"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["version"],"type":"object","title":"VersionedResource","description":"VersionedResource"},"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":{"description":"","operationId":"getDocumentSet","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"}},"summary":"Get document set","tags":["Document Sets (Core)"]}}}}
```

## POST /api/documentsets/{documentSetRef}/documents

> Create document

```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":{"additionalProperties":false,"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"},"file":{"$ref":"#/components/schemas/NamedFile"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"minItems":1,"type":"array"},"priority":{"minimum":0,"type":"number"},"status":{"$ref":"#/components/schemas/DocumentStatus"},"type":{"$ref":"#/components/schemas/DocumentType"}},"required":["type"],"type":"object","title":"ExternalPrintableDocumentForCreation","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"},"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"},"DocumentType":{"enum":["PDF","PNG","JPG","GIF","JPEG","XML","JSON"],"type":"string","title":"DocumentType","description":"DocumentType"},"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"},"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":{"operationId":"addDocument","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":"Entity not found"}},"summary":"Create document","tags":["Document Sets (Core)"]}}}}
```

## PATCH /api/documentsets/{documentSetRef}/documents/{documentRef}

> Update document

```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":{"additionalProperties":false,"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"},"operations":{"description":"Offered operations for this document","items":{"$ref":"#/components/schemas/DocumentOperations"},"minItems":1,"type":"array"},"priority":{"description":"Sorting display order of document","format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/DocumentStatus"},"version":{"description":"Version of the documentSet you want to update a document of","format":"int64","type":"integer"}},"required":["version"],"type":"object","title":"PrintableDocumentForUpdate","description":"PrintableDocumentForUpdate"},"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"},"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"},"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":{"operationId":"updateDocument","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"}}},"description":"PartialDocument","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":"Entity not found"}},"summary":"Update document","tags":["Document Sets (Core)"]}}}}
```

## GET /api/documentsets/{documentSetRef}/documents/{documentRef}/file

> Get file

```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"}}},"paths":{"/api/documentsets/{documentSetRef}/documents/{documentRef}/file":{"get":{"description":"","operationId":"downloadDocument","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"}},"summary":"Get file","tags":["Document Sets (Core)"]}}}}
```

## PUT /api/documentsets/{documentSetRef}/documents/{documentRef}/file

> Update file

```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":{"additionalProperties":false,"properties":{"documentSetVersion":{"description":"Version of documentSet to which this document belongs.","type":"number"},"file":{"$ref":"#/components/schemas/NamedFile"}},"required":["file","documentSetVersion"],"type":"object","title":"ExternalDocumentContentForUpdate","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":{"operationId":"addContentToDocument","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"}}},"description":"Document Content with id and version","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":"Entity not found"}},"summary":"Update file","tags":["Document Sets (Core)"]}}}}
```


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
