> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.zippd.com/llms.txt.
> For full documentation content, see https://api-docs.zippd.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.zippd.com/_mcp/server.

# Create a Delivery Review

POST https://sandbox-api.deliveryapp.com/api/v1/order-reviews
Content-Type: application/json

This endpoint allows both auth token and delivery recipient code/email verification for authorisation.

There are a few fields available to attribute the review to the correct order. The attribution fields are:
* `code`/`email`
* `order_id`
* `location_id`

An auth token must be sent with the request when attributing using the `order_id` and `location_id` fields.

To prevent abiguity in the data, presenting more than one of these fields in a request will result in a validation error. For example, a request with both `order_id` and the `code` and `email` fields will fail, even if the order ID matches the code and email.

Reference: https://api-docs.zippd.com/reviews/post-order-reviews

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /order-reviews:
    post:
      operationId: post-order-reviews
      summary: Create a Delivery Review
      description: >-
        This endpoint allows both auth token and delivery recipient code/email
        verification for authorisation.


        There are a few fields available to attribute the review to the correct
        order. The attribution fields are:

        * `code`/`email`

        * `order_id`

        * `location_id`


        An auth token must be sent with the request when attributing using the
        `order_id` and `location_id` fields.


        To prevent abiguity in the data, presenting more than one of these
        fields in a request will result in a validation error. For example, a
        request with both `order_id` and the `code` and `email` fields will
        fail, even if the order ID matches the code and email.
      tags:
        - subpackage_reviews
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Reviews_post-order-reviews_Response_201'
        '422':
          description: The data sent contained errors.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Post-order-reviewsRequestUnprocessableEntityError
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                rating:
                  type: integer
                  description: The rating of the review.
                message:
                  type: string
                  description: >-
                    Additional information given by the reviewer along with the
                    rating.
                code:
                  type: string
                  description: >-
                    Optional, but required if `email` is present in the request
                    data. The tracking code of a delivery.
                email:
                  type: string
                  description: >-
                    Optional, but required if `code` is present in the request
                    data. The email address of the delivery recipient.
                order_id:
                  type: string
                  format: uuid
                  description: The ID of the order to create a review for.
                location_id:
                  type: integer
                  description: The ID of the drop-off location to create a review for.
              required:
                - rating
servers:
  - url: https://sandbox-api.deliveryapp.com/api/v1
components:
  schemas:
    Review:
      type: object
      properties:
        rating:
          type: integer
          description: The numerical rating of this review, between 1 and 5.
        message:
          type: string
          description: >-
            Additional information given by the reviewer when the review was
            given.
        reviewer_name:
          type: string
          description: The name of the person who provided the review.
        created_at:
          type: string
          format: date-time
          description: The date/time at which the review was given.
      description: The details of a review given for the order (delivery) or drop-off.
      title: Review
    Reviews_post-order-reviews_Response_201:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Review'
      title: Reviews_post-order-reviews_Response_201
    OrderReviewsPostResponsesContentApplicationJsonSchemaErrors:
      type: object
      properties:
        '[field_key]':
          type: array
          items:
            type: string
      description: >-
        A list of errors. Each item will represent a single field and contain a
        simple array of error messages.
      title: OrderReviewsPostResponsesContentApplicationJsonSchemaErrors
    Post-order-reviewsRequestUnprocessableEntityError:
      type: object
      properties:
        message:
          type: string
          description: An overview of the error response.
        errors:
          $ref: >-
            #/components/schemas/OrderReviewsPostResponsesContentApplicationJsonSchemaErrors
          description: >-
            A list of errors. Each item will represent a single field and
            contain a simple array of error messages.
      title: Post-order-reviewsRequestUnprocessableEntityError

```

## SDK Code Examples

```python
import requests

url = "https://sandbox-api.deliveryapp.com/api/v1/order-reviews"

payload = { "rating": 4 }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://sandbox-api.deliveryapp.com/api/v1/order-reviews';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"rating":4}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.deliveryapp.com/api/v1/order-reviews"

	payload := strings.NewReader("{\n  \"rating\": 4\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.deliveryapp.com/api/v1/order-reviews")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"rating\": 4\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox-api.deliveryapp.com/api/v1/order-reviews")
  .header("Content-Type", "application/json")
  .body("{\n  \"rating\": 4\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox-api.deliveryapp.com/api/v1/order-reviews', [
  'body' => '{
  "rating": 4
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox-api.deliveryapp.com/api/v1/order-reviews");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"rating\": 4\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["rating": 4] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.deliveryapp.com/api/v1/order-reviews")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```