> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/api-reference/package-api/sfa-config.md).

# Sfa Config

## GET /api/v4/SfaConfig

> GetSfaConfig by brand code

```json
{"openapi":"3.0.4","info":{"title":"Package API","version":"2.0.1395.0"},"tags":[{"name":"SfaConfig"}],"servers":[{"url":"https://logistics-package-api.sandbox.eshopworld.com/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Please insert JWT with Bearer into field","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Package.Data.CosmosDb.Entities.SfaConfig":{"required":["tenantCode"],"type":"object","properties":{"id":{"type":"string","nullable":true},"tenantCode":{"minLength":1,"type":"string"},"createBulkPackagesLimitNumber":{"type":"integer","format":"int32"},"countryISO":{"type":"array","items":{"type":"string"},"nullable":true},"shipFromAnywhereFields":{"type":"array","items":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.ShipFromAnywhereField"},"nullable":true},"dimensionsInfo":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.DimensionsInfo"},"weightInfo":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.WeightInfoSfa"},"ttl":{"type":"integer","format":"int32"}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.ShipFromAnywhereField":{"type":"object","properties":{"name":{"type":"string","nullable":true},"display":{"type":"boolean"},"mandatory":{"type":"boolean"}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.DimensionsInfo":{"type":"object","properties":{"length":{"type":"integer","format":"int32"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"dimensionUnit":{"type":"string","nullable":true}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.WeightInfoSfa":{"type":"object","properties":{"weight":{"type":"number","format":"double"},"weightUnit":{"type":"string","nullable":true}},"additionalProperties":false},"Package.Model.Exceptions.Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message:\n\n\nBrand is not configured for Ship from Store;\n\nFromDate must be less than ToDate;\n\nInvalid PageNumber;\n\nInvalid PageSize;\n\nInvalid OrderId;\n\nInvalid TenantCode;\n\nAt least one OrderArticleId is required;\n\nHublocation is required;\n\nThis Tenants BrandCode Doesn't Exist;\n\nLabel GET Failed for Order {OrderId};\n\nInvalid value {Quantity} supplied;\n\n{PropertyName} is required;\n\n{PropertyName} has invalid length;\n\n{PropertyName} has invalid field value;\n\nPackageRequestMustBeSet: Request is not valid/well-formed;","nullable":true},"code":{"type":"integer","description":"Error code","format":"int32"}},"additionalProperties":false,"description":"Error information."}}},"paths":{"/api/v4/SfaConfig":{"get":{"tags":["SfaConfig"],"summary":"GetSfaConfig by brand code","parameters":[{"name":"tenantCode","in":"query","description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"SfaConfig found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}},"400":{"description":"Validation failure","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}},"401":{"description":"The request failed as a bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}},"404":{"description":"SfaConfig not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}}}}}}}
```

## POST /api/v4/SfaConfig

> Create SfaConfig for a specific brand

```json
{"openapi":"3.0.4","info":{"title":"Package API","version":"2.0.1395.0"},"tags":[{"name":"SfaConfig"}],"servers":[{"url":"https://logistics-package-api.sandbox.eshopworld.com/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Please insert JWT with Bearer into field","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Package.Data.CosmosDb.Entities.SfaConfig":{"required":["tenantCode"],"type":"object","properties":{"id":{"type":"string","nullable":true},"tenantCode":{"minLength":1,"type":"string"},"createBulkPackagesLimitNumber":{"type":"integer","format":"int32"},"countryISO":{"type":"array","items":{"type":"string"},"nullable":true},"shipFromAnywhereFields":{"type":"array","items":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.ShipFromAnywhereField"},"nullable":true},"dimensionsInfo":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.DimensionsInfo"},"weightInfo":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.WeightInfoSfa"},"ttl":{"type":"integer","format":"int32"}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.ShipFromAnywhereField":{"type":"object","properties":{"name":{"type":"string","nullable":true},"display":{"type":"boolean"},"mandatory":{"type":"boolean"}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.DimensionsInfo":{"type":"object","properties":{"length":{"type":"integer","format":"int32"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"dimensionUnit":{"type":"string","nullable":true}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.WeightInfoSfa":{"type":"object","properties":{"weight":{"type":"number","format":"double"},"weightUnit":{"type":"string","nullable":true}},"additionalProperties":false},"Package.Model.Exceptions.Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message:\n\n\nBrand is not configured for Ship from Store;\n\nFromDate must be less than ToDate;\n\nInvalid PageNumber;\n\nInvalid PageSize;\n\nInvalid OrderId;\n\nInvalid TenantCode;\n\nAt least one OrderArticleId is required;\n\nHublocation is required;\n\nThis Tenants BrandCode Doesn't Exist;\n\nLabel GET Failed for Order {OrderId};\n\nInvalid value {Quantity} supplied;\n\n{PropertyName} is required;\n\n{PropertyName} has invalid length;\n\n{PropertyName} has invalid field value;\n\nPackageRequestMustBeSet: Request is not valid/well-formed;","nullable":true},"code":{"type":"integer","description":"Error code","format":"int32"}},"additionalProperties":false,"description":"Error information."}}},"paths":{"/api/v4/SfaConfig":{"post":{"tags":["SfaConfig"],"summary":"Create SfaConfig for a specific brand","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}},"responses":{"200":{"description":"SfaConfig Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}},"400":{"description":"Validation failure","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}},"401":{"description":"The request failed as a bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}}}}}}}
```

## PUT /api/v4/SfaConfig

> Create SfaConfig for a specific brand

```json
{"openapi":"3.0.4","info":{"title":"Package API","version":"2.0.1395.0"},"tags":[{"name":"SfaConfig"}],"servers":[{"url":"https://logistics-package-api.sandbox.eshopworld.com/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Please insert JWT with Bearer into field","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Package.Data.CosmosDb.Entities.SfaConfig":{"required":["tenantCode"],"type":"object","properties":{"id":{"type":"string","nullable":true},"tenantCode":{"minLength":1,"type":"string"},"createBulkPackagesLimitNumber":{"type":"integer","format":"int32"},"countryISO":{"type":"array","items":{"type":"string"},"nullable":true},"shipFromAnywhereFields":{"type":"array","items":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.ShipFromAnywhereField"},"nullable":true},"dimensionsInfo":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.DimensionsInfo"},"weightInfo":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.WeightInfoSfa"},"ttl":{"type":"integer","format":"int32"}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.ShipFromAnywhereField":{"type":"object","properties":{"name":{"type":"string","nullable":true},"display":{"type":"boolean"},"mandatory":{"type":"boolean"}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.DimensionsInfo":{"type":"object","properties":{"length":{"type":"integer","format":"int32"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"dimensionUnit":{"type":"string","nullable":true}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.WeightInfoSfa":{"type":"object","properties":{"weight":{"type":"number","format":"double"},"weightUnit":{"type":"string","nullable":true}},"additionalProperties":false},"Package.Model.Exceptions.Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message:\n\n\nBrand is not configured for Ship from Store;\n\nFromDate must be less than ToDate;\n\nInvalid PageNumber;\n\nInvalid PageSize;\n\nInvalid OrderId;\n\nInvalid TenantCode;\n\nAt least one OrderArticleId is required;\n\nHublocation is required;\n\nThis Tenants BrandCode Doesn't Exist;\n\nLabel GET Failed for Order {OrderId};\n\nInvalid value {Quantity} supplied;\n\n{PropertyName} is required;\n\n{PropertyName} has invalid length;\n\n{PropertyName} has invalid field value;\n\nPackageRequestMustBeSet: Request is not valid/well-formed;","nullable":true},"code":{"type":"integer","description":"Error code","format":"int32"}},"additionalProperties":false,"description":"Error information."}}},"paths":{"/api/v4/SfaConfig":{"put":{"tags":["SfaConfig"],"summary":"Create SfaConfig for a specific brand","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}},"responses":{"200":{"description":"SfaConfig Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}},"400":{"description":"Validation failure","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}},"401":{"description":"The request failed as a bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}}}}}}}
```

## DELETE /api/v4/SfaConfig

> delete SfaConfig dimension

```json
{"openapi":"3.0.4","info":{"title":"Package API","version":"2.0.1395.0"},"tags":[{"name":"SfaConfig"}],"servers":[{"url":"https://logistics-package-api.sandbox.eshopworld.com/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Please insert JWT with Bearer into field","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Package.Model.Exceptions.Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message:\n\n\nBrand is not configured for Ship from Store;\n\nFromDate must be less than ToDate;\n\nInvalid PageNumber;\n\nInvalid PageSize;\n\nInvalid OrderId;\n\nInvalid TenantCode;\n\nAt least one OrderArticleId is required;\n\nHublocation is required;\n\nThis Tenants BrandCode Doesn't Exist;\n\nLabel GET Failed for Order {OrderId};\n\nInvalid value {Quantity} supplied;\n\n{PropertyName} is required;\n\n{PropertyName} has invalid length;\n\n{PropertyName} has invalid field value;\n\nPackageRequestMustBeSet: Request is not valid/well-formed;","nullable":true},"code":{"type":"integer","description":"Error code","format":"int32"}},"additionalProperties":false,"description":"Error information."}}},"paths":{"/api/v4/SfaConfig":{"delete":{"tags":["SfaConfig"],"summary":"delete SfaConfig dimension","parameters":[{"name":"id","in":"query","description":"","schema":{"type":"string"}},{"name":"tenantCode","in":"query","description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"Package deleted"},"400":{"description":"Validation failure","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}},"401":{"description":"The request failed as a bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}},"404":{"description":"Could not find SfaConfig","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}},"409":{"description":"SfaConfig is not in a valid state for deletion","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}}}}}}}
```

## POST /api/v4/SfaConfig/MigrateCurrentConfiguration

> Create SfaConfig from current front end json file

```json
{"openapi":"3.0.4","info":{"title":"Package API","version":"2.0.1395.0"},"tags":[{"name":"SfaConfig"}],"servers":[{"url":"https://logistics-package-api.sandbox.eshopworld.com/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Please insert JWT with Bearer into field","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Package.Model.DTO.SfaConfigBatchDto":{"type":"object","properties":{"createBulkPackagesLimitNumber":{"type":"integer","description":"Gets or sets the limit number for creating bulk packages.","format":"int32"},"brandCountryCombination":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.DTO.BrandCountryCombination"},"description":"Gets or sets the list of brand and country combinations.","nullable":true},"shipFromAnywhereFields":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.DTO.ShipFromAnywhereField"},"description":"Gets or sets the list of fields for Ship From Anywhere.","nullable":true},"dimensionsInfo":{"$ref":"#/components/schemas/Package.Model.DTO.DimensionsInfo"},"weightInfo":{"$ref":"#/components/schemas/Package.Model.DTO.WeightInfoBatchDto"}},"additionalProperties":false,"description":"Represents a batch configuration for SFA (Ship From Anywhere)."},"Package.Model.DTO.BrandCountryCombination":{"type":"object","properties":{"tenantCode":{"type":"string","description":"Gets or sets the tenant code.","nullable":true},"brandCode":{"type":"string","description":"Gets or sets the brand code.","nullable":true},"countryIso":{"type":"array","items":{"type":"string"},"description":"Gets or sets the list of country ISO codes.","nullable":true}},"additionalProperties":false,"description":"Represents a combination of brand and country."},"Package.Model.DTO.ShipFromAnywhereField":{"type":"object","properties":{"name":{"type":"string","description":"Gets or sets the name of the field.","nullable":true},"display":{"type":"boolean","description":"Gets or sets a value indicating whether the field is displayed."},"mandatory":{"type":"boolean","description":"Gets or sets a value indicating whether the field is mandatory."}},"additionalProperties":false,"description":"Represents a field for Ship From Anywhere."},"Package.Model.DTO.DimensionsInfo":{"type":"object","properties":{"length":{"type":"integer","description":"Gets or sets the length.","format":"int32"},"width":{"type":"integer","description":"Gets or sets the width.","format":"int32"},"height":{"type":"integer","description":"Gets or sets the height.","format":"int32"},"dimensionUnit":{"type":"string","description":"Gets or sets the unit of the dimensions.","nullable":true}},"additionalProperties":false,"description":"Represents the dimensions information."},"Package.Model.DTO.WeightInfoBatchDto":{"type":"object","properties":{"weight":{"type":"number","description":"Gets or sets the weight.","format":"double"},"weightUnit":{"type":"string","description":"Gets or sets the unit of the weight.","nullable":true}},"additionalProperties":false,"description":"Represents the weight information."},"Package.Data.CosmosDb.Entities.SfaConfig":{"required":["tenantCode"],"type":"object","properties":{"id":{"type":"string","nullable":true},"tenantCode":{"minLength":1,"type":"string"},"createBulkPackagesLimitNumber":{"type":"integer","format":"int32"},"countryISO":{"type":"array","items":{"type":"string"},"nullable":true},"shipFromAnywhereFields":{"type":"array","items":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.ShipFromAnywhereField"},"nullable":true},"dimensionsInfo":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.DimensionsInfo"},"weightInfo":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.WeightInfoSfa"},"ttl":{"type":"integer","format":"int32"}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.ShipFromAnywhereField":{"type":"object","properties":{"name":{"type":"string","nullable":true},"display":{"type":"boolean"},"mandatory":{"type":"boolean"}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.DimensionsInfo":{"type":"object","properties":{"length":{"type":"integer","format":"int32"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"dimensionUnit":{"type":"string","nullable":true}},"additionalProperties":false},"Package.Data.CosmosDb.Entities.WeightInfoSfa":{"type":"object","properties":{"weight":{"type":"number","format":"double"},"weightUnit":{"type":"string","nullable":true}},"additionalProperties":false},"Package.Model.Exceptions.Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message:\n\n\nBrand is not configured for Ship from Store;\n\nFromDate must be less than ToDate;\n\nInvalid PageNumber;\n\nInvalid PageSize;\n\nInvalid OrderId;\n\nInvalid TenantCode;\n\nAt least one OrderArticleId is required;\n\nHublocation is required;\n\nThis Tenants BrandCode Doesn't Exist;\n\nLabel GET Failed for Order {OrderId};\n\nInvalid value {Quantity} supplied;\n\n{PropertyName} is required;\n\n{PropertyName} has invalid length;\n\n{PropertyName} has invalid field value;\n\nPackageRequestMustBeSet: Request is not valid/well-formed;","nullable":true},"code":{"type":"integer","description":"Error code","format":"int32"}},"additionalProperties":false,"description":"Error information."}}},"paths":{"/api/v4/SfaConfig/MigrateCurrentConfiguration":{"post":{"tags":["SfaConfig"],"summary":"Create SfaConfig from current front end json file","requestBody":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.DTO.SfaConfigBatchDto"}}}}},"responses":{"200":{"description":"SfaConfig Migration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}},"400":{"description":"Validation failure","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}}},"401":{"description":"The request failed as a bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Model.Exceptions.Error"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package.Data.CosmosDb.Entities.SfaConfig"}}}}}}}}}
```


---

# 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://developer.esw.com/api-reference/package-api/sfa-config.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.
