Sales API

for owner, author, and affiliate

GET /api/v1/courses/:course_id/products/:product_id/sales

Parameters

Name Description
id id
course_id Id of the course
product_id Id of the product
user_id Id of a user
coupon_code code of a coupon to use

Request

Headers

Accept: application/json
X-Api-Token: w32M588mHjQLEg8P2M6TU5eiyX3RLjMx3w
X-Api-Email: user-234@example.com

Route

GET /api/v1/courses/76/products/48/sales

Query Parameters

{}: 

cURL

curl "http://localhost:3000/api/v1/courses/76/products/48/sales" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: w32M588mHjQLEg8P2M6TU5eiyX3RLjMx3w" \
	-H "X-Api-Email: user-234@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 146

Status

200 OK

Body

{
  "sales": [

  ],
  "meta": {
    "total": 0,
    "page": 1,
    "from": 0,
    "to": 0,
    "per": 25,
    "number_of_pages": 1,
    "query": {
      "course_id": "76",
      "product_id": "48",
      "school_id": 115
    }
  }
}

Request

Headers

Accept: application/json
X-Api-Token: w32M588mHjQLEg8P2M6TU5eiyX3RLjMx3w
X-Api-Email: user-234@example.com

Route

GET /api/v1/courses/76/products/48/sales

Query Parameters

{}: 

cURL

curl "http://localhost:3000/api/v1/courses/76/products/48/sales" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: w32M588mHjQLEg8P2M6TU5eiyX3RLjMx3w" \
	-H "X-Api-Email: user-234@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 146

Status

200 OK

Body

{
  "sales": [

  ],
  "meta": {
    "total": 0,
    "page": 1,
    "from": 0,
    "to": 0,
    "per": 25,
    "number_of_pages": 1,
    "query": {
      "course_id": "76",
      "product_id": "48",
      "school_id": 115
    }
  }
}

Request

Headers

Accept: application/json
X-Api-Token: w32M588mHjQLEg8P2M6TU5eiyX3RLjMx3w
X-Api-Email: user-234@example.com

Route

GET /api/v1/courses/76/products/48/sales

Query Parameters

{}: 

cURL

curl "http://localhost:3000/api/v1/courses/76/products/48/sales" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: w32M588mHjQLEg8P2M6TU5eiyX3RLjMx3w" \
	-H "X-Api-Email: user-234@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 146

Status

200 OK

Body

{
  "sales": [

  ],
  "meta": {
    "total": 0,
    "page": 1,
    "from": 0,
    "to": 0,
    "per": 25,
    "number_of_pages": 1,
    "query": {
      "course_id": "76",
      "product_id": "48",
      "school_id": 115
    }
  }
}