[**@wocart/storefront v3.1.0**](../../README)

***

[@wocart/storefront](../../README) / [astro](../README) / StorefrontRoutes

# Interface: StorefrontRoutes\<C\>

## Type Parameters

### C

`C` *extends* [`AstroAPIContext`](../type-aliases/AstroAPIContext)

## Properties

### abandonedConvert

> `readonly` **abandonedConvert**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

POST `{ sessionId, orderId, orderNumber }` → 204.

***

### abandonedUpsert

> `readonly` **abandonedUpsert**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

POST an `AbandonedCheckoutInput` → 204.

***

### cartValidate

> `readonly` **cartValidate**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

POST a basket `{ items }` or one product `{ productId, productName, quantity,
variantSelections, offerId, … }`, each with an optional `destination`,
`couponCode` and `phone` → `{ success: true, data: CartValidation }`.
With a destination, `data.delivery` is the fee and total the order will
charge; with a code, `data.coupon` is what it does.

***

### communes

> `readonly` **communes**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

GET, path param `wilayaId` → `{ data: Commune[] }`.

***

### orderStatus

> `readonly` **orderStatus**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

POST `{ orderNumber, phone }` → `{ data: ShopperOrderStatus }`. A wrong
number or phone is refused with `ORDER_NOT_FOUND`; too many tries with
`ORDER_LOOKUP_RATE_LIMITED` (429, `windowSeconds`).

***

### otpSend

> `readonly` **otpSend**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

POST `{ phone }` → `{ data: OtpSendResult }`.

***

### otpVerify

> `readonly` **otpVerify**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

POST `{ phone, requestId, code }` → `{ data: OtpVerifyResult }`.

***

### reviewEligibility

> `readonly` **reviewEligibility**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

POST `{ orderNumber, phone, turnstileToken? }` → `{ data: ReviewEligibility }`.

***

### reviewsList

> `readonly` **reviewsList**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

GET, path param `productId`, query `limit`/`offset` → `{ data: Review[], total }`.

***

### reviewSubmit

> `readonly` **reviewSubmit**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

POST a `ReviewInput` → 201 `{ success: true, data: { id, visibility } }`.

***

### reviewUpload

> `readonly` **reviewUpload**: [`StorefrontApiRoute`](../type-aliases/StorefrontApiRoute)\<`C`\>

PUT one file as the body, the grant in `X-Review-Grant` (and a voice
note's length in `X-Media-Duration-Ms`) → 201 `{ data: ReviewUpload }`.
The file streams on to the server unbuffered.
