With the /GarmentGrids endpoint user can render a garment grid.
GET
/api/GarmentGrids/Render
Returns a pdf file.
Model Request Example
/api/GarmentGrids/Code=code
RESPONSE EXAMPLE
Response will be a pdf file.
GET
/api/GarmentGrids/List
Get a list of all GarmentGrids
Request Example
/api/GarmentGrids/List
RESPONSE EXAMPLE
[
{
"Id": "string",
"Name": "string",
"Code": "string",
"Filename": "string",
"IsIntroductionPage": true / false ,
"PrimaryColour": "string",
"SecondaryColour": "string",
"AvailableFiles": null,
"SelectedProducts": [
"string",
...
],
"SelectedTemplates": [
"string",
...
],
"PTDesigns": [{...}],
"PTPersonalizations": [...]
]
},
{...}
]
GET
/api/GarmentGrids/Get
Get a garmentGrid
Request Example
/api/GarmentGrids/Get?id=garmentGridId&code=garmentGridCode
Use id parameter to get garmentGrid by id or
Use name parameter to get garmentGrid by name
RESPONSE EXAMPLE
If found, a garmentGrid is returned with status code 200. Otherwise an error with code and message is returned with status code 404
{
"Id": "string",
"Name": "string",
"Code": "string",
"Filename": "string",
"IsIntroductionPage": true / false ,
"PrimaryColour": "string",
"SecondaryColour": "string",
"AvailableFiles": null,
"SelectedProducts": [
"string",
...
],
"SelectedTemplates": [
"string",
...
],
"PTDesigns": [{...}],
"PTPersonalizations": [...]
]
}
POST
/api/GarmentGrids/Create
Create a garmentGrid
Model Request Example
Request Content will be of type multipart/form-data with following keys
file - (Required) The Garment Grid file
Name - (Required) Name to use for the Garment Grid
Code - (Required) Code to use for the Garment Grid
PrimaryColour - (Optional) primary colour
SecondaryColour - (Optional) secondary colour
IsIntroductionPage - (Optional) true / false
Products - (Optional) string. Separated by comma(,) product Id
Templates -(Optional) string. Separated by comma(,) template Id
PTDesigns - (Optional) list value.
- ElementName (required)
- SelectedDesigns (required)
parameter name - PTDesigns[0].ElementName - string.
PTDesigns[0].Designs - string. design Id
PTPersonalizations - (Optional) list value.
- ElementName (required)
- Text (required)
parameter name - PTPersonalizations[0].ElementName - string.
PTPersonalizations[0].Text - string. design
Response Example
If the operation is successful a garmentGrid will be returned with status code 201
Otherwise an error with code and message will be returned with status code 409
PUT
/api/GarmentGrids/Update
Update a garmentGrid
Request Example
/api/GarmentGrids/Update?id=garmentGridId&name=garmentGridName
Use id parameter to identify the garmentGrid to update by id or
Use name parameter to identify the garmentGrid to update by name
Model Request Example
Request Content will be of type multipart/form-data with following keys
All fields are updated
file - (Required) The Garment Grid file
Name - (Required) Name to use for the Garment Grid
Code - (Required) Code to use for the Garment Grid
PrimaryColour - (Optional) primary colour
SecondaryColour - (Optional) secondary colour
IsIntroductionPage - (Optional) true / false
Products - (Optional) string. Separated by comma(,) product Id
Templates -(Optional) string. Separated by comma(,) template Id
PTDesigns - (Optional) list value.
- ElementName (required)
- SelectedDesigns (required)
parameter name - PTDesigns[0].ElementName - string.
PTDesigns[0].Designs - string.
PTPersonalizations - (Optional) list value.
- ElementName (required)
- Text (required)
parameter name - PTPersonalizations[0].ElementName - string.
PTPersonalizations[0].Text - string. design
Response Example
If the operation is successful an empty response will be returned with status code 200
Otherwise an error with code and message will be returned with status code 409
DELETE
/api/GarmentGrids/Delete
Delete a garmentGrid
Request Example
/api/GarmentGrids/Delete?id=garmentGridId&name=garmentGridName
Use id parameter to identify the garmentGrid to update by id or
Use name parameter to identify the garmentGrid to delete by name
Response Example
If the operation is successful an empty response will be returned with status code 200
Otherwise an error with code and message will be returned with status code 409