Developer Portal

Valley Eats Developer Documentation: Request Delivery API

Your guide to integrating with Valley Eats delivery services.

Introduction

The Request Delivery API allows businesses to automate the process of scheduling deliveries through Valley Eats' platform. This documentation provides comprehensive information on integrating, testing, and using the API to its fullest potential.

Getting Started

  1. Sign up obtain your credentials.
  2. Set up the authorizatoin as described below.
  3. Make POST requests to the endpoint with the appropriate payload and access token.
  4. Handle the response in your application.

Authentication

Authentication between Canadian Tire and Valley Eats uses OAUTH 2.0 All API requests require authentication. You can authenticate your application by including an accesss token in the request header.

To authenticate CTC for inbound communication to Valley Eats follow these steps:

  1. Receive client_id and client_secret from Valley Eats and store in secure location
  2. Make an HTTPS POST request to https://apivalleyeats.auth.us-east-1.amazoncognito.com/oauth2/token with the following parameters and headers
    • URL: https://apivalleyeats.auth.us-east-1.amazoncognito.com/oauth2/token
    • Parameters:
      • client_id=CLIENTID
      • client_secret=CLIENTSECRET
      • grant_type='client_credentials'
    • Headers:
      • Content-Type: application/x-www-form-urlencoded
      • Authorization: AuthorizationHeader
      • The AuthorizationHeader is made by base64 encoding the clientId and clientSecret together ie. $authorizationHeader = 'Basic ' . base64_encode($apiConfig['client_id'] . ':' . $apiConfig['client_secret'])
  3. This will return an object with access_token, expires_in, and token_type.
  4. Use the access token provided to access the Valley Eats APIs.

Ensure the following headers are included in your API requests:

Endpoints

Validate Delivery Address

POST https://api.valleyeats.ca/orders/validateDeliveryAddress

This endpoint allows you to create a delivery. See endpoint details for required parameters and response format.

Create Delivery

POST https://api.valleyeats.ca/orders/createDelivery

This endpoint allows you to create a delivery. See endpoint details for required parameters and response format.

API Reference