> ## Documentation Index
> Fetch the complete documentation index at: https://developers-docs.easyorders.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a review

> **Scope:** [`write_reviews`](/scopes)

Adds a review to a product of the store. `is_accepted` is `false`
unless you send `true`: only accepted reviews show on the product
page.

- `product_id` must be a live product of this store, or the answer
  is `422` with the rule `product`. It cannot change later.
- `user_name` and `comment` are plain text: `<` is refused.
- `image` must be an `https` URL.

Sends the `reviews/created` event. Send an `Idempotency-Key` to
retry safely.




## OpenAPI

````yaml /openapi.json post /reviews
openapi: 3.1.0
info:
  title: EasyOrders Admin API
  version: v1
  summary: Read and write a merchant's store data from your app.
  description: |
    The EasyOrders Admin API lets an installed app work with one merchant's
    store: its orders, shipping settings and shipping areas, within the
    scopes the merchant approved.

    - Every request needs an access token (`Authorization: Bearer eo_at_...`)
      from the OAuth flow. A token works on one store only.
    - Request and response bodies are JSON. Unknown fields and query
      parameters are refused.
    - Errors share one shape: `{"error": {"code", "message", "details"}}`.
    - `v1` is stable: new fields and endpoints are added to it; a breaking
      change ships as a new version.
  contact:
    name: EasyOrders developers
    url: https://easyorders.eg
servers:
  - url: https://api.easy-orders.net/api/partners-apps/v1
    description: Production
security:
  - accessToken: []
tags:
  - name: Article categories
    description: >-
      The categories of the store's blog, which articles name in their
      `category_ids`.
  - name: Articles
    description: The articles of the store's blog, with HTML content, tags and categories.
  - name: Billing
    description: >-
      Your app's plan subscription and usage wallet on the store, and debiting
      the wallet by usage.
  - name: Categories
    description: The store's product categories and subcategories.
  - name: Checkout fields
    description: >-
      The fields of the store's checkout form, their labels, order, and whether
      they show and are required.
  - name: Coupons
    description: >-
      The store's coupons, by code or automatic, and the products, variants and
      categories they apply to.
  - name: Labels
    description: >-
      Your app's short colored words on orders and products, shown in the
      merchant's orders and products tables.
  - name: Missed orders
    description: >-
      Checkouts the shopper started and did not finish, to follow up and
      recover.
  - name: Orders
    description: The store's orders, their status, payment status and notes.
  - name: Pages
    description: >-
      The store's pages, such as About us or the return policy, with HTML
      content.
  - name: Products
    description: The store's products, their options, variants and stock.
  - name: Reviews
    description: >-
      The reviews of the store's products, and which of them the product page
      shows.
  - name: Shipping
    description: The store's shipping settings and shipping areas (governorates).
  - name: Store
    description: >-
      The store the access token belongs to, its addresses, currency, language
      and plan.
paths:
  /reviews:
    post:
      tags:
        - Reviews
      summary: Create a review
      description: |
        **Scope:** [`write_reviews`](/scopes)

        Adds a review to a product of the store. `is_accepted` is `false`
        unless you send `true`: only accepted reviews show on the product
        page.

        - `product_id` must be a live product of this store, or the answer
          is `422` with the rule `product`. It cannot change later.
        - `user_name` and `comment` are plain text: `<` is refused.
        - `image` must be an `https` URL.

        Sends the `reviews/created` event. Send an `Idempotency-Key` to
        retry safely.
      operationId: createReview
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewCreate'
            example:
              product_id: 0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10
              rating: 5
              user_name: Sara Adel
              comment: |-
                Great quality, arrived in two days.
                Would buy again.
              image: https://cdn.example.com/reviews/sara-shoes.jpg
              is_accepted: true
      responses:
        '201':
          description: The review created. `Location` is its path.
          headers:
            Location:
              schema:
                type: string
            Idempotent-Replayed:
              description: >-
                `true` when this is the saved answer of an earlier request with
                the same `Idempotency-Key`.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - review
                properties:
                  review:
                    $ref: '#/components/schemas/Review'
              example:
                review:
                  id: 7e3d9a2b-5c1f-4b8e-a6d4-3f2e1d0c9b8a
                  product_id: 0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10
                  rating: 5
                  user_name: Sara Adel
                  comment: |-
                    Great quality, arrived in two days.
                    Would buy again.
                  image: https://cdn.example.com/reviews/sara-shoes.jpg
                  is_accepted: true
                  created_at: '2026-12-04T12:30:00Z'
                  updated_at: '2026-12-04T12:30:00Z'
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '409':
          description: '`idempotency_in_progress`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: idempotency_in_progress
                  message: >-
                    A request with this Idempotency-Key is still running; retry
                    shortly
        '422':
          description: >-
            `validation_failed`, for instance when `product_id` is not a live
            product of this store.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: validation_failed
                  message: Validation failed
                  details:
                    fields:
                      - field: product_id
                        rule: product
        '429':
          $ref: '#/components/responses/RateLimited'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X POST
            "https://api.easy-orders.net/api/partners-apps/v1/reviews" \
              -H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN" \
              -H "Idempotency-Key: review-import-7781" \
              -H "Content-Type: application/json" \
              -d '{
              "product_id": "0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10",
              "rating": 5,
              "user_name": "Sara Adel",
              "comment": "Great quality, arrived in two days.\nWould buy again.",
              "image": "https://cdn.example.com/reviews/sara-shoes.jpg",
              "is_accepted": true
            }'
        - lang: typescript
          label: TypeScript
          source: >-
            const response = await
            fetch('https://api.easy-orders.net/api/partners-apps/v1/reviews', {
              method: 'POST',
              headers: {
                Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
                'Idempotency-Key': 'review-import-7781',
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({
                product_id: '0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10',
                rating: 5,
                user_name: 'Sara Adel',
                comment: 'Great quality, arrived in two days.\nWould buy again.',
                image: 'https://cdn.example.com/reviews/sara-shoes.jpg',
                is_accepted: true,
              }),
            })


            const json = await response.json()

            if (!response.ok) {
              throw new Error(`${json.error.code}: ${json.error.message}`)
            }

            const { review } = json
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\n\t  \"product_id\": \"0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10\",\n\t  \"rating\": 5,\n\t  \"user_name\": \"Sara Adel\",\n\t  \"comment\": \"Great quality, arrived in two days.\\nWould buy again.\",\n\t  \"image\": \"https://cdn.example.com/reviews/sara-shoes.jpg\",\n\t  \"is_accepted\": true\n\t}`)\n\n\treq, err := http.NewRequest(\"POST\", \"https://api.easy-orders.net/api/partners-apps/v1/reviews\", bytes.NewReader(body))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"EASYORDERS_ACCESS_TOKEN\"))\n\treq.Header.Set(\"Idempotency-Key\", \"review-import-7781\")\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tres, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer res.Body.Close()\n\n\tvar answer map[string]any\n\tif err := json.NewDecoder(res.Body).Decode(&answer); err != nil {\n\t\tpanic(err)\n\t}\n\tif res.StatusCode >= 300 {\n\t\tpanic(fmt.Sprint(res.Status, answer[\"error\"]))\n\t}\n\tfmt.Println(answer[\"review\"])\n}"
        - lang: php
          label: PHP
          source: >-
            <?php


            $ch =
            curl_init('https://api.easy-orders.net/api/partners-apps/v1/reviews');

            curl_setopt_array($ch, [
                CURLOPT_CUSTOMREQUEST => 'POST',
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_HTTPHEADER => [
                    'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
                    'Idempotency-Key: review-import-7781',
                    'Content-Type: application/json',
                ],
                CURLOPT_POSTFIELDS => json_encode([
                    'product_id' => '0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10',
                    'rating' => 5,
                    'user_name' => 'Sara Adel',
                    'comment' => "Great quality, arrived in two days.\nWould buy again.",
                    'image' => 'https://cdn.example.com/reviews/sara-shoes.jpg',
                    'is_accepted' => true,
                ]),
            ]);


            $answer = json_decode(curl_exec($ch), true);

            $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

            curl_close($ch);


            if ($status >= 300) {
                throw new RuntimeException($answer['error']['code'] . ': ' . $answer['error']['message']);
            }

            $review = $answer['review'];
        - lang: python
          label: Python
          source: |-
            import os

            import requests

            response = requests.post(
                "https://api.easy-orders.net/api/partners-apps/v1/reviews",
                headers={
                    "Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
                    "Idempotency-Key": "review-import-7781",
                },
                json={
                    "product_id": "0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10",
                    "rating": 5,
                    "user_name": "Sara Adel",
                    "comment": "Great quality, arrived in two days.\nWould buy again.",
                    "image": "https://cdn.example.com/reviews/sara-shoes.jpg",
                    "is_accepted": True,
                },
                timeout=30,
            )
            answer = response.json()
            if not response.ok:
                raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
            review = answer["review"]
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: |
        A unique key (up to 255 printable ASCII characters). The same key
        from your app within 24 hours answers the first result again, with
        `Idempotent-Replayed: true`, instead of creating twice.
      schema:
        type: string
        maxLength: 255
  schemas:
    ReviewCreate:
      type: object
      required:
        - product_id
        - rating
        - user_name
      additionalProperties: false
      description: No field takes `null`.
      properties:
        product_id:
          type: string
          format: uuid
          description: A live product of this store. It cannot change later.
        rating:
          $ref: '#/components/schemas/ReviewRating'
        user_name:
          $ref: '#/components/schemas/ReviewUserName'
        comment:
          allOf:
            - $ref: '#/components/schemas/ReviewComment'
          default: ''
        image:
          allOf:
            - $ref: '#/components/schemas/ReviewImage'
          default: ''
        is_accepted:
          type: boolean
          default: false
          description: '`true` shows the review on the product page.'
    Review:
      type: object
      properties:
        id:
          type: string
          format: uuid
        product_id:
          type: string
          format: uuid
          description: The product reviewed. Set on create, never changes.
        rating:
          type: integer
          minimum: 1
          maximum: 5
        user_name:
          type: string
          description: The reviewer's name, as the product page shows it.
        comment:
          type: string
          description: Plain text, may hold line breaks. `""` for none.
        image:
          type: string
          description: An `https` image URL, or `""` for none.
        is_accepted:
          type: boolean
          description: Only accepted reviews show on the product page.
        created_at:
          type: string
          format: date-time
          description: '`1970-01-01T00:00:00Z` for an old review saved without one.'
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: A stable, snake_case code. Branch on it, not on the message.
            message:
              type: string
              description: A human-readable explanation. It may change.
            details:
              description: More about the error, shaped per code.
    ReviewRating:
      type: integer
      minimum: 1
      maximum: 5
      description: A whole number of stars.
    ReviewUserName:
      type: string
      minLength: 1
      maxLength: 255
      description: One line, trimmed, no invisible characters and no `<`.
    ReviewComment:
      type: string
      maxLength: 5000
      description: >-
        Trimmed. Line breaks and tabs are kept; `<` and invisible characters are
        refused.
    ReviewImage:
      type: string
      maxLength: 2048
      description: >-
        An `https` URL with a host, no user name or password, no `#` fragment,
        and none of `"`, `'`, `<`, `>`, `` ` ``, `\` or spaces. `""` for none.
  responses:
    InvalidRequest:
      description: >-
        The body is not a JSON object, or has a field of the wrong type or an
        unknown field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request
              message: 'Invalid JSON body: unknown field'
    Unauthenticated:
      description: The access token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthenticated
              message: Missing or invalid access token
    PaymentRequired:
      description: Your app's subscription on this store is suspended.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: payment_required
              message: The app's subscription on this store is suspended
    InsufficientScope:
      description: The token lacks the scope this endpoint needs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: insufficient_scope
              message: 'This request requires the scope: read_orders'
              details:
                required_scope: read_orders
    RateLimited:
      description: More than 600 requests in a minute from your app on this store.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: too_many_requests
              message: Rate limit exceeded
  headers:
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: >
        An access token from the OAuth flow (`eo_at_...`). It lasts one hour;

        refresh it with the refresh token. See
        [Authentication](/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.