Lorem ipsum be be bleh.
| HTTP Verb | Description |
|---|---|
| GET | Used for retrieving records |
| PATCH | Used for updating records |
| POST | Used for creating records |
| PUT | Used for updating records implemented as patch |
| DELETE | Used for deleting records |
| Status | Code | Description | Usage |
|---|---|---|---|
| 2xx - Success | 200 | OK | General success code |
| 201 | Created | Success code for creating records | |
| 204 | No Content | Success without response | |
| 3xx - Redirection | 304 | Not Modified | |
| 4xx - Client Error | 400 | Bad Request | |
| 401 | Unauthorized | ||
| 403 | Forbidden | ||
| 404 | Not Found | ||
| 405 | Method Not Allowed | ||
| 409 | Conflict | ||
| 5xx - Server Error | 500 | Internal Server Error | |
| 501 | Not Implemented | ||
| 502 | Bad Gateway | ||
| 503 | Service Unavailable |
| 2xx - Success | 3xx - Redirection | 4xx - Client Error | 5xx - Server Error |
|---|---|---|---|
| 200 - OK | 304 - Not Modified | 400 - Bad Request | 500 - Internal Server Error |
| 201 - Created | 401 - Unauthorized | 501 - Not Implemented | |
| 204 - No Content | 403 - Forbidden | 502 - Bad Gateway | |
| 404 - Not Found | 503 - Service Unavailable | ||
| 405 - Method Not Allowed | |||
| 409 - Conflict |

| Name | Description |
|---|---|
| Protocol | Http or Https |
| Domain Name or Base URL | The server in which the API resides |
| API Version | Current version of the API |
| Resource | Refers to the resource to be retrieved or modified |
| Parameters | URL query string |
At the moment the API supports camel, pascal, underscore, snake and dash cases. That being said, developers should refrain from using other cases like UPPERCASE for example.
The API is case sensitive when it comes to its URI but case insensitive else where.
http://api.mymovementrx.com/v1/companies is not equal to http://api.mymovementrx.com/v1/Companies
but
http://api.mymovementrx.com/v1/companies?api-key=s3cur3k3y is equal to http://api.mymovementrx.com/v1/companies?ApiKey=s3cur3k3y
URI follow the convention of using dash case and the plural form of the resource.
http://api.mymovementrx.com/v1/therapists/1/therapist-educations
Notice that both therapists and therapist-educations are in plural form and therapist-educations uses the dash case.
Request parameters should accept any of the given cases.
http://api.mymovementrx.com/v1/therapists?api-key=s3cur3k3y is equal to http://api.mymovementrx.com/v1/therapists?apiKey=s3cur3k3y
Notice that api-key on the first url is in dash case while apiKey on the other url is in camel case.
The API is case insensitive with its post values and should accept any of the given cases.
[
'name' => 'Prosoft',
'group_id' => 'Prosoft',
'phone' => '443-78-20',
'contact_person_email' => 'rommel.berganio@prosoft-phils.com',
'contact_person_last_name' => 'Berganio',
'contact_person_first_name' => 'Rommel',
'contact_person_middle_initial' => 'G',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
]
is equal to
[
'Name' => 'Prosoft',
'GroupId' => 'Prosoft',
'Phone' => '443-78-20',
'ContactPersonEmail' => 'rommel.berganio@prosoft-phils.com',
'ContactPersonLastName' => 'Berganio',
'ContactPersonFirstName' => 'Rommel',
'ContactPersonMiddleInitial' => 'G',
'StatusId' => 1,
'DateCreated' => date('Y-m-d H:i:s'),
'DateUpdated' => date('Y-m-d H:i:s'),
'IsArchived' => 0
]
Notice that the first array keys are in underscore/snake case while the other array's keys are in pascal case.
Without the API key any response to the server will be rejected.
Can be added as http header.
http://api.mymovementrx.com/v1/companies?api-key=s3cur3k3y
Limits the number or response
http://api.mymovementrx.com/v1/companies?limit=100
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies?offset=100
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies?order=desc
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies?sort=name&order=desc
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies?sort=name,description&=desc,asc
Lorem Ipsum Dolor
json,jsonp,xml,serialized,csv
http://api.mymovementrx.com/v1/companies?format=json
Lorem Ipsum Dolor
camel,pascal,underscore,snake,dash
http://api.mymovementrx.com/v1/companies?case=camel
Lorem Ipsum Dolor
true or false
http://api.mymovementrx.com/v1/companies?envelope=false
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies?fields=name,description,date_created
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies/search?search-term=Prosoft
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies/search?search-term=Prosoft&search-fields=name,descriptions
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies?format=jsonp&callback=jsonCallback
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies?format=csv&delimiter=|
| Name | Description | Sample Usage |
|---|---|---|
| api-key | ||
| limit | ||
| offset | ||
| order | ||
| sort | ||
| format | ||
| case | ||
| envelope | ||
| fields | ||
| search-term | ||
| search-fields | ||
| callback | ||
| delimeter |
You can retrieve data using the HTTP Verb GET be be bleh.
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies/1
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies?status=active
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies/1/providers
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies/1/providers/1
Lorem Ipsum Dolor
http://api.mymovementrx.com/v1/companies/1/providers?status=inactive
You can search data using the HTTP Verbs GET or POST.
Lorem Ipsum Dolor
GET: http://api.mymovementrx.com/v1/companies/search/Prosoft
GET: http://api.mymovementrx.com/v1/companies/search?search-term=Prosoft
Lorem Ipsum Dolor
POST: http://api.mymovementrx.com/v1/companies/search
[
'search-term' => 'Prosoft'
]
Lorem Ipsum Dolor
GET|POST: http://api.mymovementrx.com/v1/companies/search?search-term=Prosoft&search-fields=name,description
You can create a record using the HTTP Verb POST be be bleh.
Lorem Ipsum Dolor
POST: http://api.mymovementrx.com/v1/companies
See the format below
[
'name' => 'Prosoft',
'group_id' => 'Prosoft',
'phone' => '443-78-20',
'contact_person_email' => 'rommel.berganio@prosoft-phils.com',
'contact_person_last_name' => 'Berganio',
'contact_person_first_name' => 'Rommel',
'contact_person_middle_initial' => 'G',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
]
Lorem Ipsum Dolor
POST: http://api.mymovementrx.com/v1/companies/add
See the format below
[
'records' => [
0 => [
'name' => 'Prosoft',
'phone' => '443-78-20',
'contact_person_email' => 'rommel.berganio@prosoft-phils.com',
'contact_person_last_name' => 'Berganio',
'contact_person_first_name' => 'Rommel',
'contact_person_middle_initial' => 'B',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
],
1 => [
'name' => 'Another Company',
'phone' => '443-78-20',
'contact_person_email' => 'another@prosoft-phils.com',
'contact_person_last_name' => 'Another First',
'contact_person_first_name' => 'Another Last',
'contact_person_middle_initial' => 'B',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
]
]
]
Company will automatically be related to provider
POST: http://api.mymovementrx.com/v1/providers/1/companies
See the format below
[
'name' => 'Prosoft',
'group_id' => 'Prosoft',
'phone' => '443-78-20',
'contact_person_email' => 'rommel.berganio@prosoft-phils.com',
'contact_person_last_name' => 'Berganio',
'contact_person_first_name' => 'Rommel',
'contact_person_middle_initial' => 'G',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
]
Companies will automatically be related to provider
POST: http://api.mymovementrx.com/v1/providers/1/companies/add
See the format below
[
'records' => [
0 => [
'name' => 'Prosoft',
'phone' => '443-78-20',
'contact_person_email' => 'rommel.berganio@prosoft-phils.com',
'contact_person_last_name' => 'Berganio',
'contact_person_first_name' => 'Rommel',
'contact_person_middle_initial' => 'B',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
],
1 => [
'name' => 'Another Company',
'phone' => '443-78-20',
'contact_person_email' => 'another@prosoft-phils.com',
'contact_person_last_name' => 'Another First',
'contact_person_first_name' => 'Another Last',
'contact_person_middle_initial' => 'B',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
]
]
]
You can update a record using the HTTP Verbs PUT or PATCH be be bleh.
Lorem Ipsum Dolor
PATCH|PUT: http://api.mymovementrx.com/v1/companies
See the format below
[
'name' => 'Prosoft',
'group_id' => 'Prosoft',
'phone' => '443-78-20',
'contact_person_email' => 'rommel.berganio@prosoft-phils.com',
'contact_person_last_name' => 'Berganio',
'contact_person_first_name' => 'Rommel',
'contact_person_middle_initial' => 'G',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
]
This will make sure that the record being updated belongs to a parent before updating it.
PATCH|PUT: http://api.mymovementrx.com/v1/provider/1/companies
See the format below
[
'name' => 'Prosoft',
'group_id' => 'Prosoft',
'phone' => '443-78-20',
'contact_person_email' => 'rommel.berganio@prosoft-phils.com',
'contact_person_last_name' => 'Berganio',
'contact_person_first_name' => 'Rommel',
'contact_person_middle_initial' => 'G',
'status_id' => 1,
'date_created' => date('Y-m-d H:i:s'),
'date_updated' => date('Y-m-d H:i:s'),
'is_archived' => 0
]
You can delete data using the HTTP Verbs DELETE or POST respectively.
Lorem Ipsum Dolor
DELETE: http://api.mymovementrx.com/v1/companies/1
Lorem Ipsum Dolor POST
POST: http://api.mymovementrx.com/v1/companies/delete
[
'records' => [1,2,3]
]
This will make sure that the child belongs to a parent before deleting it.
DELETE: http://api.mymovementrx.com/v1/providers/1/companies/1
This will make sure that the records belongs to a parent before deleting them.
POST: http://api.mymovementrx.com/v1/providers/1/companies/delete
[
'records' => [1,2,3]
]
You can attach records using the HTTP Verbs PATCH, POST or PUT.
Attaching refers to relating a record to another record or records
Lorem Ipsum Dolor
PATCH|PUT|POST: http://api.mymovementrx.com/v1/providers/1/companies/1/attach
If the relation is many to many you may add pivot values to the relational table.
PATCH|PUT|POST: http://api.mymovementrx.com/v1/providers/1/companies/1/attach
[
'pivot' => [
'description' => 'Some Description',
'date_updated' => 'Some date'
]
]
Lorem Ipsum Dolor POST
POST: http://api.mymovementrx.com/v1/providers/1/companies/attach
[
'records' => [1,2,3]
]
Lorem Ipsum Dolor POST
POST: http://api.mymovementrx.com/v1/providers/1/companies/attach
[
'records' => [
1 => [
'description' => 'Some description'
],
2 => [
'description' => 'Some other description'
],
3 => [
'description' => 'Last description'
]
]
]
You can detach records using the HTTP Verbs PATCH, POST or PUT.
Detaching refers to the removal of a record's relation to another record or records
Lorem Ipsum Dolor
PATCH|PUT|POST: http://api.mymovementrx.com/v1/providers/1/companies/1/detach
Lorem Ipsum Dolor POST
POST: http://api.mymovementrx.com/v1/providers/1/companies/detach
[
'records' => [1,2,3]
]
You can sync records using the HTTP Verbs PATCH, POST or PUT.
Sync is similar to attach except it deletes all existing relations that are not part of the sync
Lorem Ipsum Dolor
PATCH|PUT|POST: http://api.mymovementrx.com/v1/providers/1/companies/1/sync
If the relation is many to many you may add pivot values to the relational table.
PATCH|PUT|POST: http://api.mymovementrx.com/v1/providers/1/companies/1/sync
[
'pivot' => [
'description' => 'Some Description',
'date_updated' => 'Some date'
]
]
Lorem Ipsum Dolor POST
POST: http://api.mymovementrx.com/v1/providers/1/companies/sync
[
'records' => [1,2,3]
]
Lorem Ipsum Dolor POST
POST: http://api.mymovementrx.com/v1/providers/1/companies/sync
[
'records' => [
1 => [
'description' => 'Some description'
],
2,
3
]
]