---
agentTools:
  projectIndex: https://getgrasp.readme.io/llms.txt
---

# Search orders

Search orders for a contact.

# OpenAPI definition

````json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Grasp Api",
    "description": "This is a first version of the API to send custom events or order data into Grasp. All endpoints require authorization. Set the value for the ```api_key``` header with your personal key provided by Grasp.",
    "termsOfService": "https://getgrasp.com/terms/",
    "contact": {
      "email": "support@getgrasp.com"
    },
    "version": "1.1.1"
  },
  "externalDocs": {
    "description": "Grasp API confluence doc",
    "url": "https://casengo.atlassian.net/wiki/spaces/HOME/pages/1333723178/Casengo%2BAPI%2B2020%2BMVP"
  },
  "servers": [
    {
      "url": "https://app.getgrasp.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "Order",
      "description": "Insert and update order info"
    }
  ],
  "paths": {
    "/contact/orders/search": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Search orders",
        "description": "Search orders for a contact.",
        "operationId": "searchOrders",
        "requestBody": {
          "description": "Find orders for a contact",
          "content": {
            "*/*": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifiers": {
                    "$ref": "#/components/schemas/Identifier"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "List of orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Order"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid order id supplied",
            "content": {}
          },
          "404": {
            "description": "Order not found",
            "content": {}
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "x-codegen-request-body-name": "identifiers"
      }
    }
  },
  "components": {
    "schemas": {
      "Order": {
        "type": "object",
        "properties": {
          "identifiers": {
            "$ref": "#/components/schemas/Identifier"
          },
          "order": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64",
                "example": 96486
              },
              "source": {
                "type": "string",
                "example": "magento"
              },
              "order_id": {
                "type": "string",
                "example": "000000063"
              },
              "customer_id": {
                "type": "string",
                "example": "1192"
              },
              "status": {
                "type": "string",
                "description": "Order Status",
                "example": "NEW"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "example": "2019-09-07T17:02:00Z"
              },
              "properties": {
                "$ref": "#/components/schemas/OrderData"
              }
            }
          }
        },
        "xml": {
          "name": "Order"
        }
      },
      "OrderData": {
        "type": "object",
        "additionalProperties": {
          "type": "object",
          "properties": {}
        }
      },
      "Identifier": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/IdentifierItem"
        }
      },
      "IdentifierItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "CASENGO_CONTACT_ID",
              "EMAIL",
              "PHONE"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "example": {
          "type": "EMAIL",
          "value": "john@grasp.com"
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 149,
      "2": 223,
      "3": 215,
      "4": 223,
      "5": 75,
      "6": 167,
      "7": 157,
      "8": 126,
      "9": 122,
      "10": 47,
      "11": 119
    }
  }
}
````