Property Labels API Routes

GET /admin/property-labels#

List Property Labels

Retrieve a list of property labels. The property labels can be filtered by fields such as id. The property labels can also be sorted or paginated.

Feature flag: This API route is only available when the view_configurations feature flag is enabled. Set the MEDUSA_FF_VIEW_CONFIGURATIONS environment variable to true to enable it.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Query parameters

entitystringOptional
The property label's entity.
propertystringOptional
The property label's property.
qstringOptional
The property label's q.
limitnumberOptional
Limit the number of items returned in the list.
offsetnumberOptional
The number of items to skip when retrieving a list.
orderstringOptional
The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with -.
with_deletedbooleanOptional
The property label's with deleted.
fieldsstringOptional
Comma-separated fields that should be included in the returned data. If a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. Without prefix it will replace the entire default fields.

Request examples

Responses

200 OK

property_labelsobject[]
TThe list of property labels.
countnumber
The total number of property labels.
offsetnumber
The number of items skipped before retrieving the returned items.
limitnumber
The maximum number of items returned.

400, 401, 404, 409, 422, 500: an error response is returned.


POST /admin/property-labels#

Create Property Label

Create a property label.

Feature flag: This API route is only available when the view_configurations feature flag is enabled. Set the MEDUSA_FF_VIEW_CONFIGURATIONS environment variable to true to enable it.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Request body (application/json)

entitystring
The name of the entity the property label belongs to.
propertystring
The property the label is for.
labelstring
The label to use for the property.
descriptionstringOptional
The description of the property label.

Request examples

Responses

201 OK

property_labelobject
The property label's details.

400, 401, 404, 409, 422, 500: an error response is returned.


POST /admin/property-labels/batch#

Create Property Label

Create a property label.

Feature flag: This API route is only available when the view_configurations feature flag is enabled. Set the MEDUSA_FF_VIEW_CONFIGURATIONS environment variable to true to enable it.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Request body (application/json)

createobject[]Optional
The property labels to create.
updateobject[]Optional
The property labels to update.
deletestring[]Optional
The property labels to delete.

Request examples

Responses

200 OK

createdobject[]
The created property labels.
updatedobject[]
The updated property labels.
deletedobject[]
The deleted property labels.

400, 401, 404, 409, 422, 500: an error response is returned.


GET /admin/property-labels/{id}#

Get a Property Label

Retrieve a property label by its ID.

Feature flag: This API route is only available when the view_configurations feature flag is enabled. Set the MEDUSA_FF_VIEW_CONFIGURATIONS environment variable to true to enable it.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

idstring
The property label's ID.

Request examples

Responses

200 OK

property_labelobject
The property label's details.

400, 401, 404, 409, 422, 500: an error response is returned.


POST /admin/property-labels/{id}#

Update a Property Label

Update a property label's details.

Feature flag: This API route is only available when the view_configurations feature flag is enabled. Set the MEDUSA_FF_VIEW_CONFIGURATIONS environment variable to true to enable it.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

idstring
The property label's ID.

Request body (application/json)

labelstringOptional
The label of the property.
descriptionstringOptional
The property label's description.

Request examples

Responses

200 OK

property_labelobject
The property label's details.

400, 401, 404, 409, 422, 500: an error response is returned.


DELETE /admin/property-labels/{id}#

Delete a Property Label

Delete a property label.

Feature flag: This API route is only available when the view_configurations feature flag is enabled. Set the MEDUSA_FF_VIEW_CONFIGURATIONS environment variable to true to enable it.

Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.

Path parameters

idstring
The property label's ID.

Request examples

Responses

200 OK

idstring
The ID of the deleted property label.
objectstring
The type of the deleted object, which is property_label.
deletedboolean
Whether the property label was successfully deleted.

400, 401, 404, 409, 422, 500: an error response is returned.

Found a problem with this page?Report Issue
Edited Nov 14·Edit this page