Dress Measurement API

The Dress Measurement API is available at https://api.dressmeasurement.com This API has been developed by Aeeiee, Inc. It is used to perform basic CRUD operations on the Measurements database for the Dress Measurement app on iOS.

This API supports four functions:


We will go over how to use each one of them in detail in the following sections.

1. Insert

URL: https://api.dressmeasurement.com/insert
Method: POST
Content Type: Application/JSON
Headers Required: You MUST have these headers set in order for the request to work:
  • X-Auth-Token - Your unique token.
  • X-Auth-Timestamp - The UNIX timestamp that you have used with your Secret to generate the Signature.
  • X-Auth-Signature - The signature generated from the Timestamp and the Secret using the SHA256 hashing algorithm.
Request Body: You can set the following parameters in the Request Body:
  • measurement_id (string) (required) - The GUID associated with each measurement.
  • name (string) (required) - Name of the measurement.
  • short_name (string) (required) - A short name associated with the measurement
  • instructions (string) (required) - Any instructions for the measurement.
  • type (string) (required) - Type of measurement (example: Measurement or Ghost)
  • enabled (boolean) (required) - Whether the measurement is enabled or not.
  • page_num (number) (required) - Page Number for the measurement.
  • coordinates (array) (required) - An array of the co-ordinates for the measurements (Example: see below for an example).
  • label_coordinates (array) (optional) - An array of single x,y co-ordinate for the measurements. label_coordinates can be omitted if the type is 'Ghost' (Example: see below for an example).
  • app_version (string) (required) - App Version
Example Request: {
   "measurement_id": "ABCD1234XYZ",
   "name": "Head",
   "short_name": "H",
   "instructions": "Units are in inches",
   "type": "Measurement",
   "enabled": 1,
   "page_num": 1,
   "coordinates": [ "3.4", "61.5", "101.23", "161.45", "231.23", "311.01", "410.99", "510.77" ],
   "label_coordinates": [ "23.5", "31.7"],
   "app_version": "1.3"
}
Return Value: If the measurement was inserted successfully, this function returns the ID of the inserted measurement.
Example response:
{
   "response": {
      "status": 200,
      "message": "OK",
      "data": {
         "id": "26465"
         "measurement_id": "ABCD1234XYZ"
      }
   }
}

2. Read

URL: https://api.dressmeasurement.com/read?measurement_id={measurement_id}
Method: GET
Content Type: -
Headers Required: You MUST have these headers set in order for the request to work:
  • X-Auth-Token - Your unique token.
  • X-Auth-Timestamp - The UNIX timestamp that you have used with your Secret to generate the Signature.
  • X-Auth-Signature - The signature generated from the Timestamp and the Secret using the SHA256 hashing algorithm.
Request Body -
Example Request: -
Return Value: Returns a JSON response like the following:
{
   "response": {
      "status": 200,
      "message": "OK",
      "data": {
         "id": "26465",
         "measurement_id": "ABCD1234XYZ",
         "name": "Head",
         "short_name": "H",
         "instructions": "Instructions",
         "type": "Measurement",
         "enabled": "1",
         "created": "2018-07-24 22:29:12",
         "modified": "2018-07-24 22:43:39",
         "page_num": "1",
         "coordinates": [
            "3.4",
            "61.5",
            "101.23",
            "161.45",
            "231.23",
            "311.01",
            "410.99",
            "510.77"
         ],
         "label_coordinates": [
            "23.5",
            "31.7",
         ],
         "app_version": "1.3"
      }
   }
}

3. Update

URL: https://api.dressmeasurement.com/update
Method: POST
Content Type: Application/JSON
Headers Required: You MUST have these headers set in order for the request to work:
  • X-Auth-Token - Your unique token.
  • X-Auth-Timestamp - The UNIX timestamp that you have used with your Secret to generate the Signature.
  • X-Auth-Signature - The signature generated from the Timestamp and the Secret using the SHA256 hashing algorithm.
Request Body: You can set the following parameters in the Request Body:
  • measurement_id (int) (required) - The GUID associated with the measurement.
  • name (string) (optional) - Name of the measurement.
  • short_name (string) (optional) - A short name associated with the measurement
  • instructions (string) (optional) - Any instructions for the measurement.
  • type (string) (optional) - Type of measurement (example: Measurement or Ghost)
  • enabled (boolean) (optional) - Whether the measurement is enabled or not.
  • page_num (int) (optional) - Page Number for the measurement.
  • coordinates (array) (optional) - An array of the co-ordinates for the measurements (Example: see below for an example).
  • label_coordinates (array) (optional) - An array of x,y co-ordinates of a single measurement. Can be blank if type is 'Ghost'. (Example: see below for an example).
  • app_version (string) (optional) - App Version
Only the parameters set in the request body to the Update method will be updated, the rest of them will keep their old values.
Example Request: {
   "measurement_id": "ABCD1234XYZ",
   "instructions": "These are some new instructions here.",
   "short_name": "HD",
   "enabled": 1
}
Return Value: If the measurement was updated successfully, this function returns the ID of the updated measurement.
Example response:
{
   "response": {
      "status": 200,
      "message": "OK",
      "data": {
         "measurement_id": "ABCD1234XYZ"
      }
   }
}

4. Delete

URL: https://api.dressmeasurement.com/delete
Method: POST
Content Type: Application/JSON
Headers Required: You MUST have these headers set in order for the request to work:
  • X-Auth-Token - Your unique token.
  • X-Auth-Timestamp - The UNIX timestamp that you have used with your Secret to generate the Signature.
  • X-Auth-Signature - The signature generated from the Timestamp and the Secret using the SHA256 hashing algorithm.
Request Body: The Request Body must have the following parameters:
  • measurement_id (int) (required) - The GUID associated with each measurement.
Example Request: {
   "measurement_id": "ABCD1234XYZ"
}
Return Value: If the measurement was deleted successfully, it will return a 200 OK message success message.
{
   "response": {
      "status": 200,
      "message": "OK"
   }
}