Skip to content

tys.garments.publish()

Method@tryyoursize/node

Publishes a complete draft. Key scope: garments:publish.

publish(id: string, options?: RequestOptions): Promise<GarmentVersion>
idstringRequired

The draft's ID.

optionsRequestOptionsOptional

Promise<GarmentVersion>: The published version. Shoppers get sizes for it from now on.

InvalidRequestError (422) with issues listing what is missing.

try {
await tys.garments.publish(draft.id);
} catch (err) {
if (err instanceof InvalidRequestError) console.log(err.issues); // what is missing
}

Was this page helpful?