https://www.marstranslation.com/oauth/v2/token
                                Explanation:
                                    Login method would be used to login any registered user by providing Username and
                                    Password. access_token in the response will be to access all secure methods.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | grant_type | true | Valid grant type is : 'password' | 
| 2 | client_id | true | {{PUT CLIENT KEY HERE}} | 
| 3 | client_secret | true | {{PUT CLIENT SECRET HERE}} | 
| 4 | username | true | Username or email of user | 
| 5 | password | true | Password of user | 
curl -X POST -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
             -F "grant_type=password"
             -F "client_id={{PUT CLIENT KEY HERE}}"
             -F "client_secret= {{PUT CLIENT SECRET HERE}}"
             -F "username=example@gmail.com"
             -F "password=123456"
                "https://www.marstranslation.com/oauth/v2/token"
                                {
  "access_token": "NGMzY2FjNzg0MjYzN2Q3Zjk0MTc3YWJjODg1NGNmYjUwNDMyMTAzYTk2MmU5ZGQzMTQ0YWNiZGU2MjM0NTI5MQ",
  "expires_in": 3600,
  "token_type": "bearer",
  "scope": null,
  "refresh_token": "ZDI1MWJkNTNjNWM3NzdmZDE3M2Y1MTA5ZTBiYmM3YzJiMzFiZjdkYWExMTNiMjBhOGM4NmEyYzE2Y2M2MjQ1ZQ"
}
                                https://www.marstranslation.com/api/v2/user/logout
                                Explanation:
                                    Logout method is used for invalidate a generated access_token and logout a logged in
                                    user.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
curl -X GET -H "Authorization: Bearer  YTliN2I2M2Q2NTFhNWI4MjJlYWY4OWI0OTlmOGE4NGRiNjdiOTgzMWU3ZGQwYTRkZmNhNjc3MjczNzFjNjkyZQ"
               "https://www.marstranslation.com/api/v2/user/logout?access_token={{ACCESS-TOKEN}}"
                                {
  "message": "Logged Out successfully"
}
                                https://www.marstranslation.com/api/v2/public/language/list
                                Explanation:
                                    Get Source languages method will return all the supported source langugages. Code
                                    returned in response will be used a source language identifier for any future calls.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT KEY HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
curl -X GET -H "clientId: {{PUT CLIENT KEY HERE}}"
            -H "clientSecret: {{PUT CLIENT SECRET HERE}}"
            "https://www.marstranslation.com/api/v2/public/language/list"
                                {
  "source_languages": [
    {
      "id": 5,
      "name": "Arabic",
      "code": "ara",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/baccb2309f8fcb793d0fc8edf0d72cda59aa7ab7.jpeg"
    },
    {
      "id": 15,
      "name": "Bulgarian",
      "code": "bul",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/a5e2c2f126b711ec771aea0f036b7407900b4e18.jpeg"
    },
    {
      "id": 121,
      "name": "Burmese",
      "code": "mya",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/default/0001/01/526489ff5f844065c9934ef3bad8d8c7765255a1.jpeg"
    },
    .
    .
    .
  ]
}
                                https://www.marstranslation.com/api/v2/public/language/list
                                Explanation:
                                    Allows user to get all target languages against source language iso639-3 code
                                    obtained in source language call.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT KEY HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | language_code | false | iso639-3 Language code obtained in source language call. | 
curl -X GET -H "clientId: {{PUT CLIENT KEY HERE}}"
            -H "clientSecret: {{PUT CLIENT SECRET HERE}}"
            "https://www.marstranslation.com/api/v2/public/language/list?language_code=eng"
                                {
  "target_languages": [
    {
      "id": 17,
      "name": "Chinese Simplified (Mandarin)",
      "code": "zho",
      "price": 0.05,
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/1981f1b425dbd0d3c09420eb521ab2415e09ecde.jpeg"
    },
    {
      "id": 18,
      "name": "Chinese Traditional",
      "code": "cmn",
      "price": 0.08,
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/cf8a39b18ffcb4bf30045064206d5b90372ebe94.jpeg"
    },
    {
      "id": 26,
      "name": "English",
      "code": "eng",
      "price": 0.08,
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/4f477d38f4a71a9eb7512a38488c4901b25ccf1e.jpeg"
    }
  ]
}
                                https://www.marstranslation.com/api/v2/public/language/pairs/list
                                Explanation:
                                    Allows user to get all target languages against source languages
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT KEY HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
curl -X GET -H "clientId: {{PUT CLIENT KEY HERE}}"
            -H "clientSecret: {{PUT CLIENT SECRET HERE}}"
            "https://www.marstranslation.com/api/v2/public/language/pairs/list"
                                {
  "languages": [
    {
      "id": 5,
      "name": "Arabic",
      "code": "ara",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/baccb2309f8fcb793d0fc8edf0d72cda59aa7ab7.jpeg",
      "locale": "ar-SA",
      "target_languages": [
        {
          "id": 17,
          "code": "zh-CN",
          "locale": "zh-CN",
          "isocode": "zho",
          "name": "Chinese Simplified (Mandarin)",
          "image": "114",
          "url": "chinese-translation-services",
          "price": 0.05
        },
        {
          "id": 18,
          "code": "zh-TW",
          "locale": "zh-HK",
          "isocode": "cmn",
          "name": "Chinese Traditional",
          "image": "115",
          "url": "traditional-chinese-translation-services",
          "price": 0.08
        },
        {
          "id": 26,
          "code": "en",
          "locale": "en-US",
          "isocode": "eng",
          "name": "English",
          "image": "25",
          "url": "english-translation-services",
          "price": 0.08
        }
      ]
    },
    {
      "id": 15,
      "name": "Bulgarian",
      "code": "bul",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/a5e2c2f126b711ec771aea0f036b7407900b4e18.jpeg",
      "locale": "bg-BG",
      "target_languages": [
        {
          "id": 17,
          "code": "zh-CN",
          "locale": "zh-CN",
          "isocode": "zho",
          "name": "Chinese Simplified (Mandarin)",
          "image": "114",
          "url": "chinese-translation-services",
          "price": 0.15
        },
        {
          "id": 26,
          "code": "en",
          "locale": "en-US",
          "isocode": "eng",
          "name": "English",
          "image": "25",
          "url": "english-translation-services",
          "price": 0.15
        }
      ]
    },
    {
      "id": 121,
      "name": "Burmese",
      "code": "mya",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/default/0001/01/526489ff5f844065c9934ef3bad8d8c7765255a1.jpeg",
      "target_languages": [
        {
          "id": 26,
          "code": "en",
          "locale": "en-US",
          "isocode": "eng",
          "name": "English",
          "image": "25",
          "url": "english-translation-services",
          "price": 0.08
        }
      ]
    },
    {
      "id": 146,
      "name": "Cherokee",
      "code": "chr",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/default/0001/05/6198f5c9b913cd3c7768d968cf5b59f03d2d2480.jpeg",
      "target_languages": [
        {
          "id": 26,
          "code": "en",
          "locale": "en-US",
          "isocode": "eng",
          "name": "English",
          "image": "25",
          "url": "english-translation-services",
          "price": 0.1
        }
      ]
    },
    {
      "id": 17,
      "name": "Chinese Simplified (Mandarin)",
      "code": "zho",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/1981f1b425dbd0d3c09420eb521ab2415e09ecde.jpeg",
      "locale": "zh-CN",
      "target_languages": [
        {
          "id": 26,
          "code": "en",
          "locale": "en-US",
          "isocode": "eng",
          "name": "English",
          "image": "25",
          "url": "english-translation-services",
          "price": 0.05
        },
        {
          "id": 31,
          "code": "fr",
          "locale": "fr-FR",
          "isocode": "fra",
          "name": "French (France)",
          "image": "33",
          "url": "french-translation-services",
          "price": 0.05
        },
        {
          "id": 35,
          "code": "de",
          "locale": "de-DE",
          "isocode": "deu",
          "name": "German",
          "image": "22",
          "url": "german-translation-services",
          "price": 0.05
        },
        {
          "id": 45,
          "code": "id",
          "locale": "id-ID",
          "isocode": "ind",
          "name": "Indonesian",
          "image": "46",
          "url": "indonesian-translation-services",
          "price": 0.05
        },
        {
          "id": 49,
          "code": "it",
          "locale": "it-IT",
          "isocode": "ita",
          "name": "Italian",
          "image": "50",
          "url": "italian-translation-services",
          "price": 0.05
        },
        {
          "id": 50,
          "code": "ja",
          "locale": "ja-JP",
          "isocode": "jpn",
          "name": "Japanese",
          "image": "52",
          "url": "japanese-translation-services",
          "price": 0.05
        },
        {
          "id": 58,
          "code": "ko",
          "locale": "ko-KR",
          "isocode": "kor",
          "name": "Korean",
          "image": "58",
          "url": "korean-translation-services",
          "price": 0.05
        },
        {
          "id": 73,
          "code": "mn",
          "locale": "mn-MN",
          "isocode": "mon",
          "name": "Mongolian",
          "image": "67",
          "url": "mongolian-translation-services",
          "price": 0.08
        },
        {
          "id": 82,
          "code": "pt",
          "locale": "pt-PT",
          "isocode": "psr",
          "name": "Portuguese (Portugal)",
          "image": "79",
          "url": "portuguese-translation-services",
          "price": 0.05
        },
        {
          "id": 87,
          "code": "ru",
          "locale": "ru-RU",
          "isocode": "rus",
          "name": "Russian",
          "image": "84",
          "url": "russian-translation-services",
          "price": 0.05
        },
        {
          "id": 94,
          "code": "si",
          "isocode": "sin",
          "name": "Sinhala",
          "image": "89",
          "url": "sinhala-translation-services",
          "price": 0.1
        },
        {
          "id": 126,
          "code": "sp-eu",
          "locale": "es-ES",
          "isocode": "spa",
          "name": "Spanish (Europe)",
          "image": "235",
          "url": "spanish-translation-services",
          "price": 0.05
        },
        {
          "id": 127,
          "code": "sp-la",
          "locale": "es-SA",
          "isocode": "ssp",
          "name": "Spanish (Latin American)",
          "image": "236",
          "url": "spanish-latin-american-translation-services",
          "price": 0.05
        },
        {
          "id": 105,
          "code": "th",
          "locale": "th-TH",
          "isocode": "tha",
          "name": "Thai",
          "image": "99",
          "url": "thai-translation-services",
          "price": 0.05
        }
      ]
    },
    {
      "id": 18,
      "name": "Chinese Traditional",
      "code": "cmn",
      "flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/cf8a39b18ffcb4bf30045064206d5b90372ebe94.jpeg",
      "locale": "zh-HK",
      "target_languages": [
        {
          "id": 26,
          "code": "en",
          "locale": "en-US",
          "isocode": "eng",
          "name": "English",
          "image": "25",
          "url": "english-translation-services",
          "price": 0.08
        },
        {
          "id": 31,
          "code": "fr",
          "locale": "fr-FR",
          "isocode": "fra",
          "name": "French (France)",
          "image": "33",
          "url": "french-translation-services",
          "price": 0.08
        },
        {
          "id": 35,
          "code": "de",
          "locale": "de-DE",
          "isocode": "deu",
          "name": "German",
          "image": "22",
          "url": "german-translation-services",
          "price": 0.08
        },
        {
          "id": 45,
          "code": "id",
          "locale": "id-ID",
          "isocode": "ind",
          "name": "Indonesian",
          "image": "46",
          "url": "indonesian-translation-services",
          "price": 0.08
        },
        {
          "id": 49,
          "code": "it",
          "locale": "it-IT",
          "isocode": "ita",
          "name": "Italian",
          "image": "50",
          "url": "italian-translation-services",
          "price": 0.08
        },
        {
          "id": 50,
          "code": "ja",
          "locale": "ja-JP",
          "isocode": "jpn",
          "name": "Japanese",
          "image": "52",
          "url": "japanese-translation-services",
          "price": 0.08
        },
        {
          "id": 58,
          "code": "ko",
          "locale": "ko-KR",
          "isocode": "kor",
          "name": "Korean",
          "image": "58",
          "url": "korean-translation-services",
          "price": 0.08
        },
        {
          "id": 82,
          "code": "pt",
          "locale": "pt-PT",
          "isocode": "psr",
          "name": "Portuguese (Portugal)",
          "image": "79",
          "url": "portuguese-translation-services",
          "price": 0.08
        },
        {
          "id": 87,
          "code": "ru",
          "locale": "ru-RU",
          "isocode": "rus",
          "name": "Russian",
          "image": "84",
          "url": "russian-translation-services",
          "price": 0.08
        },
        {
          "id": 126,
          "code": "sp-eu",
          "locale": "es-ES",
          "isocode": "spa",
          "name": "Spanish (Europe)",
          "image": "235",
          "url": "spanish-translation-services",
          "price": 0.08
        },
        {
          "id": 127,
          "code": "sp-la",
          "locale": "es-SA",
          "isocode": "ssp",
          "name": "Spanish (Latin American)",
          "image": "236",
          "url": "spanish-latin-american-translation-services",
          "price": 0.08
        },
        {
          "id": 105,
          "code": "th",
          "locale": "th-TH",
          "isocode": "tha",
          "name": "Thai",
          "image": "99",
          "url": "thai-translation-services",
          "price": 0.08
        }
      ]
    }
    .
    .
    .
]
                                    
                                https://www.marstranslation.com/api/v2/public/industries/list
                                
                                    Get industries provide list of all supported industries. code returned in the
                                    industry response will be used for any future reference for industries i.e. While
                                    creating new project.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT KEY HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
curl -X GET -H "clientId: {{PUT CLIENT KEY HERE}}"
            -H "clientSecret: {{PUT CLIENT SECRET HERE}}"
               "https://www.marstranslation.com/api/v2/public/industries/list"
                                {
  "industries": [
    {
      "id": 1,
      "name": "General",
      "code": "gn"
    },
    {
      "id": 2,
      "name": "Advertising / Marketing",
      "code": "adm"
    },
    {
      "id": 7,
      "name": "Automotive",
      "code": "am"
    },
    .
    .
    .
  ]
}
                                https://www.marstranslation.com/api/v2/projects/orders/places
                                
                                    Create a project call is used for creating a new project.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | source_language_code | true | iso639-3 Language code | 
| 2 | target_language_code | true | Comma separated iso639-3 Language code | 
| 3 | industry_id | true | Mars has list of active industries. This value should be the id of some Industry. | 
| 4 | num_of_words | true | Total number of words of a project. | 
| 5 | source_file | true/false | Comma separated source file absolute URL path obtained from get
                                                    quote API. Source file or text must be provided in order to create a new project.  | 
                                            
| 6 | text | true/false | Source translation text. | 
| 7 | translation_type | false | Default value=2. Valid values 1=Document translation, 2=Instant translation and 3=Audio translation and 4=Website Translation | 
| 8 | package_type | false | Default value is EP=Economy Package. It will be EP=Economy Package or PP=Professional Package | 
| 9 | gross_price | false | It is required when translation type is equal to 4 | 
| 10 | show_task_details | false | if you give "yes" then it will return with task details. | 
| 11 | callback_url | false | if you provide callback url then we will send task status to your callback url. | 
curl -X POST -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
             -F "source_language_code=eng"
             -F "target_language_code=ara"
             -F "industry_id=2"
             -F "num_of_words=150"
             -F "text=source text"
             -F "package_type=EP"
             -F "translation_type=4"
             -F "gross_price=100"
                "https://www.marstranslation.com/api/v2/projects/orders/places?access_token={{ACCESS-TOKEN}}"
                                {
  "task_id": [
    {
      "id": "610"
    }
  ],
  "order_id": 648
}
                                https://www.marstranslation.com/api/v2/projects/list
                                
                                    Allows User to get all his created projects.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | translation_type | false | Comma separated values Default value=2,3. Valid values : 1=Document translation, 2=Instant translation and 3=Audio translation and 4=Website Translation | 
| 2 | status | false | Valid values are pending, in_progress, completed | 
| 3 | page | false | Page number for pagination. | 
| 4 | records_per_page | false | default=10, number of pages record | 
curl -X GET "https://www.marstranslation.com/api/v2/projects/list?access_token={{ACCESS-TOKEN}}&translation_type=2,3"
                                {
  "pending": {
    "0": {
      "client_id": 9,
      "translation_type": 3,
      "length": 150,
      "order_id": 336,
      "task_delivery_date": "2016-05-30T14:58:07+0800",
      "time_in_minutes": 50,
      "task_time_string": "50 Mins",
      "display_id": 331,
      "task_status": "Waiting for Translation",
      "status_id": 5,
      "task_id": 363,
      "type": 1,
      "source_language_code": "eng",
      "task_created_date": "2016-05-30T14:05:37+0800",
      "target_language_code": "ara",
      "industry": "Advertising / Marketing",
      "target_language": "Arabic",
      "source_language": "English",
      "package_type": "Economy Package",
      "package_type_code": "EP"
    },
    .
    .
    .
    "9": {
      "client_id": 9,
      "translation_type": 2,
      "length": 150,
      "order_id": 123,
      "task_delivery_date": "2016-04-21T20:13:53+0800",
      "time_in_minutes": 50,
      "task_time_string": "50 Mins",
      "display_id": 174,
      "task_status": "Waiting for Translation",
      "status_id": 5,
      "task_id": 183,
      "type": 1,
      "source_language_code": "eng",
      "task_created_date": "2016-04-19T16:01:51+0800",
      "target_language_code": "ara",
      "industry": "Advertising / Marketing",
      "target_language": "Arabic",
      "source_language": "English",
      "package_type": "Economy Package",
      "package_type_code": "EP"
    },
    "pages": {
      "current_page": 1,
      "next_page": 2,
      "previous_page": 0,
      "total_pages": 11,
      "records_per_page": 10
    }
  },
  "completed": {
    "0": {
      "client_id": 9,
      "translation_type": 2,
      "length": 150,
      "order_id": 360,
      "task_delivery_date": "2016-06-01T14:07:05+0800",
      "time_in_minutes": 75,
      "task_time_string": "1 Hr 15 Mins",
      "display_id": 353,
      "task_status": "Ready Proof Reading",
      "status_id": 9,
      "task_id": 396,
      "type": 1,
      "source_language_code": "eng",
      "task_created_date": "2016-06-01T13:14:04+0800",
      "target_language_code": "ara",
      "industry": "Advertising / Marketing",
      "target_language": "Arabic",
      "source_language": "English",
      "package_type": "Professional Package",
      "package_type_code": "PP"
    },
    .
    .
    .
    "9": {
      "client_id": 9,
      "translation_type": 3,
      "length": 150,
      "order_id": 340,
      "task_delivery_date": "2016-05-30T15:40:09+0800",
      "time_in_minutes": 50,
      "task_time_string": "50 Mins",
      "display_id": 335,
      "task_status": "Waiting for Client Approval",
      "status_id": 11,
      "task_id": 369,
      "type": 1,
      "source_language_code": "eng",
      "task_created_date": "2016-05-30T14:48:16+0800",
      "target_language_code": "ara",
      "industry": "Advertising / Marketing",
      "target_language": "Arabic",
      "source_language": "English",
      "package_type": "Economy Package",
      "package_type_code": "EP"
    },
    "pages": {
      "current_page": 1,
      "next_page": 2,
      "previous_page": 0,
      "total_pages": 2,
      "records_per_page": 10
    }
  }
}
                                
                                    If you provide callback Url on your order then on every project status changed we
                                    are sending project updated status to your callback Url.
                                
| Status Code | Status | 
|---|---|
| 5 | Waiting for Translator | 
| 1 | In Progress | 
| 10 | In Progress | 
| 11 | Completed | 
| 4 | Approved | 
array (
    'type' => 'task_status',
    'task_id' => 1,
    'status_code' => 4,
    'status' => 'Approved',
    'data' => {
        "orderId":3,
        "clientId":3,
        "packageTypeCode":"EP",
        "packageType":"Economy Package",
        "task_status_code":4,
        "translator_name":"translator user",
        "translator_id":2,
        "client_rating":{"rate":0,"comments":""},
        "task_status":"Approved",
        "file":{
            "source_file":[
                {
                    "id":19,
                    "name":"castle calsh.txt",
                    "length":20,
                    "location":"https:\/\/www.marstranslation.com\/uploads\/media\/project_files\/0001\/03\/03f7154be115c98f0e6ca3cebe1d21a3c2a62a1f.txt",
                    "date_created":{"date":"2015-12-01 17:48:09.000000","timezone_type":3,"timezone":"Asia\/Shanghai"}
                },
                {
                    "id":21,
                    "name":"Free Text.txt",
                    "length":1,
                    "location":"https:\/\/www.marstranslation.com\/uploads\/1448963289.txt",
                    "date_created":{"date":"2015-12-01 17:48:09.000000","timezone_type":3,"timezone":"Asia\/Shanghai"}
                }
            ],
            "translation_file":{
                "19":{
                    "id":20,
                    "name":"test.txt",
                    "length":20,
                    "location":"https:\/\/www.marstranslation.com\/uploads\/media\/project_files\/0001\/03\/49a2bb57b331fdd56f3155ca7d530079d78eca35.txt",
                    "date_created":{"date":"2015-12-01 17:48:09.000000","timezone_type":3,"timezone":"Asia\/Shanghai"}
                },
                "21":{
                    "id":22,
                    "name":"test.txt",
                    "length":1,
                    "location":"https:\/\/www.marstranslation.com\/uploads\/media\/project_files\/0001\/03\/9f3c88180d69c69e542a7f77eaff5455b385399d.txt",
                    "date_created":{"date":"2015-12-01 17:48:09.000000","timezone_type":3,"timezone":"Asia\/Shanghai"}
                }
            }
        }
    }
);
                                https://www.marstranslation.com/api/v2/projects/task/details
                                
                                    Allows User to get Task details.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | task_id | true | Task Id | 
curl -X GET "https://www.marstranslation.com/api/v2/projects/task/detailsaccess_token={{ACCESS-TOKEN}}&task_id=396"
                                {
  "length": 150,
  "client_id": "9",
  "translation_type": 2,
  "package_type": "Professional Package",
  "order_id": 360,
  "status_id": 9,
  "date_created": "2016-06-01T13:14:03+0800",
  "date_updated": "2016-06-01T13:17:05+0800",
  "time_in_minutes": 50,
  "total_time_in_minutes": 75,
  "task_delivery_date": "2016-06-01T14:07:05+0800",
  "source_flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/baccb2309f8fcb793d0fc8edf0d72cda59aa7ab7.jpeg",
  "target_flag": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/baccb2309f8fcb793d0fc8edf0d72cda59aa7ab7.jpeg",
  "task_type": 1,
  "task_status": "Ready Proof Reading",
  "invalid_translators": [],
  "user_id": "11",
  "task_id": 396,
  "display_id": 353,
  "source_language_code": "eng",
  "target_language_code": "ara",
  "industry": "Advertising / Marketing",
  "industry_id": "2",
  "target_language_id": 5,
  "source_language_id": 26,
  "client_price": 16.59,
  "target_language": "Arabic",
  "source_language": "English",
  "translator_name": "M faizan altaf",
  "translator_id": 11,
  "proofreader_rating": {
    "rate": 0,
    "comments": ""
  },
  "client_rating": {
    "rate": 0,
    "comments": ""
  },
  "file": {
    "source_file": [
      {
        "id": 967,
        "name": "Free Text.txt",
        "user_id": 9,
        "length": 150,
        "location": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/baccb2309f8fcb793d0fc8edf0d72cda59aa7ab7.jpeg",
        "date_created": "2016-06-01T13:14:03+0800"
      }
    ],
    "translation_file": {
      "967": {
        "id": 969,
        "name": "895397384.txt",
        "user_id": 11,
        "length": 0,
        "location": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/baccb2309f8fcb793d0fc8edf0d72cda59aa7ab7.jpeg",
        "date_created": "2016-06-01T13:17:26+0800"
      }
    }
  }
}
                                https://www.marstranslation.com/api/v2/projects/order/details
                                
                                    Allows User to get Project details.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | orderId | true | Project/Order Id | 
curl -X GET "https://www.marstranslation.com/api/v2/projects/order/details?access_token={{ACCESS-TOKEN}}&orderId=142"
                                {
  "id": 142,
  "user_id": 9,
  "user_email": "example@gmail.com",
  "source_language": {
    "id": 26,
    "name": "English"
  },
  "target_language": [
    {
      "id": 5,
      "name": "Arabic"
    },
    {
      "id": 6,
      "name": "Armenian"
    }
  ],
  "task_detail_id": [],
  "industry": "General",
  "word_count": 160,
  "price": 34.88,
  "package_type": "EP",
  "delivery_type": "Normal Delivery",
  "is_paid": false,
  "service": true,
  "files": [
    {
      "id": 482,
      "name": "Free Text.txt",
      "user_id": 9,
      "length": 160,
      "language_name": "English",
      "location": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/1981f1b425dbd0d3c09420eb521ab2415e09ecde.jpeg",
      "date_created": "2016-04-25T20:10:43+0800"
    },
    {
      "id": 483,
      "name": "Free Text_Arabic.txt",
      "user_id": 9,
      "length": 160,
      "language_name": "Arabic",
      "location": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/1981f1b425dbd0d3c09420eb521ab2415e09ecde.jpeg",
      "date_created": "2016-04-25T20:10:43+0800"
    },
    {
      "id": 484,
      "name": "Free Text_Armenian.txt",
      "user_id": 9,
      "length": 160,
      "language_name": "Armenian",
      "location": "https://s3.amazonaws.com/marstranslation.aws.bucket/flag/0001/01/1981f1b425dbd0d3c09420eb521ab2415e09ecde.jpeg",
      "date_created": "2016-04-25T20:10:43+0800"
    }
  ],
  "date_created": "2016-04-25T20:10:43+0800"
}
                                https://www.marstranslation.com/api/v2/public/projects/wordcounts/texts
                                
                                    This method is used for getting total word count of given text.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT KEY HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
| # | Name | Type | Required | Description | 
|---|---|---|---|---|
| 1 | text | string | true | text for word counts | 
curl -X POST -H "clientId: {{PUT CLIENT KEY HERE}}"
             -H "clientSecret: {{PUT CLIENT SECRET HERE}}"
             -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
             -F "text=Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
                "https://www.marstranslation.com/api/v2/public/projects/wordcounts/texts"
                                {
  "word_count": 8
}
                                https://www.marstranslation.com/api/v2/public/projects/wordcounts/files
                                
                                    This call is used for getting word count of any file. "file_path" and "word_count"
                                    returned in the response will be used in "Create Project" call.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT KEY HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
| # | Name | Type | Required | Description | 
|---|---|---|---|---|
| 1 | file | file | true | Upload a file | 
curl -X POST -H "clientId: {{PUT CLIENT KEY HERE}}"
             -H "clientSecret: {{PUT CLIENT SECRET HERE}}"
             -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
             -F "file=@"
             -F "="
                "https://www.marstranslation.com/api/v2/public/projects/wordcounts/files"
                                {
  "word_count": 941,
  "file_path": "https://s3.amazonaws.com/marstranslation.aws.bucket/default/0001/01/526489ff5f844065c9934ef3bad8d8c7765255a1.jpeg"
}
                                https://www.marstranslation.com/api/v2/public/projects/words/counts/files
                                
                                    This call is used for getting total word count of multiple files. "file_paths" and
                                    "total_word_count"
                                    returned in the response will be used in "Create Project" call.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT KEY HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
| # | Name | Type | Required | Description | 
|---|---|---|---|---|
| 1 | file[] | file | true | Upload a file | 
curl -X "POST"
    -d "_format=json&file[]=C:\\fakepath\\2.jpg"
    -H "clientId:\ {{ PUT CLIENT ID HERE }}"
    -H "clientSecret:\ {{ PUT CLIENT SECRET HERE }}"
    http://www.marstranslation.com/api/v2/public/projects/words/counts/files
                                {
  "total_word_count": 941,
  "file_paths": "https://s3.amazonaws.com/marstranslation.aws.bucket/default/0001/01/526489ff5f844065c9934ef3bad8d8c7765255a1.jpeg"
}
                                https://www.marstranslation.com/api/v2/projects/tasks/statuses
                                
                                    Get Status of Project call is used for get current status of a project.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | task_statuses_ids | true | JSON Format Like this [{ "id": "2662", "status": "Waiting for Translation" }, { "id": "2663", "status": "Waiting for Translation" }, { "id": "2665", "status": "Waiting for Translation" }] | 
curl -X POST -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
             -F "task_statuses_ids=[{  \"id\": \"791\",  \"status\": \"working\" }, {  \"id\": \"793\",  \"status\": \"Waiting for Translation\" }, {  \"id\": \"793\",  \"status\": \"Waiting for Translation\" }]"
                "http://www.marstranslation.com/api/v2/projects/tasks/statuses?access_token={{ACCESS-TOKEN}}"
                                [
  {
    "length": 150,
    "client_id": "9",
    "translation_type": 4,
    "package_type": "Professional Package",
    "order_id": 766,
    "status_id": 5,
    "date_created": "2016-10-24T15:04:30+0800",
    "date_updated": "2016-10-24T15:04:31+0800",
    "time_in_minutes": 50,
    "total_time_in_minutes": 75,
    "source_flag": "http://local.marstranslation.com/uploads/media/flag/0001/01/4f477d38f4a71a9eb7512a38488c4901b25ccf1e.jpeg",
    "target_flag": "http://local.marstranslation.com/uploads/media/flag/0001/01/1767e3c3c7b78528f5fe5cad74ae53085d63e35a.jpeg",
    "task_type": 1,
    "task_status": "Waiting for Translation",
    "invalid_translators": [],
    "task_id": 791,
    "display_id": 719,
    "source_language_code": "eng",
    "target_language_code": "ara",
    "industry": "Advertising / Marketing",
    "industry_id": "2",
    "target_language_id": 5,
    "source_language_id": 26,
    "client_price": 16.65,
    "target_language": "Arabic",
    "source_language": "English",
    "proofreader_rating": {
      "rate": 0,
      "comments": ""
    },
    "client_rating": {
      "rate": 0,
      "comments": ""
    },
    "file": {
      "source_file": [
        {
          "id": 2412,
          "name": "Free Text.txt",
          "user_id": 9,
          "length": 150,
          "location": "http://local.marstranslation.com/uploads/media/project_files/0001/05/be1e3e8b97b6e9fec02b092837cd479fcb8d5471.txt",
          "date_created": "2016-10-24T15:04:30+0800"
        }
      ]
    }
  }
]
                                https://www.marstranslation.com/api/v2/ratings/details
                                
                                    This call is used for getting rating details of a task.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
curl -X GET "https://www.marstranslation.com/api/v2/ratings/details?access_token={{ACCESS-TOKEN}}&task_id=14"
                                {
  "proofreader_rating": {
    "rate": 4.5,
    "comments": "excellent work.",
    "rateType": 1,
    "user": "4",
    "task": "350"
  }
}
                                https://www.marstranslation.com/api/v2/messages/sends
                                
                                    This method will be used by user to send a discussion message for a task.
                                    Phone number, Emails and some restricted words as below will be filter/removed
                                    automatically if entered.
                                    
Restricted words: 'id', 'contact', 'email', 'num', 'emailaddress',
                                    'phone', 'cell', 'phone#', 'phonenum', 'phonenumber', 'mobile', 'call', 'call me',
                                    'skype', 'skypeaddress', 'address'
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | task_id | true | Project Task Id | 
| 2 | message | true | Comments/Message | 
curl -X POST -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
             -F "task_id=14"
             -F "message=Hello, Task discussion here"
                "https://www.marstranslation.com/api/v2/messages/sends?access_token={{ACCESS-TOKEN}}"
                                {
  "message": "Successfully sent message"
}
                                https://www.marstranslation.com/api/v2/messages/discussions
                                
                                    This call will be used to get all discussion messages of a task.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | task_id | true | Project Task Id | 
curl -X GET "https://www.marstranslation.com/api/v2/messages/discussions?access_token={{ACCESS-TOKEN}}&task_id=14"
                                [
  {
    "user_id": 9,
    "first_name": "user",
    "last_name": "user",
    "message": "Hello, Task discussion here",
    "date_created": "2016-03-15T17:34:31+0800",
    "role": [
      "ROLE_CLIENT"
    ]
  },
  {
    "user_id": 9,
    "first_name": "user",
    "last_name": "user",
    "message": "Hello, Task discussion here",
    "date_created": "2016-03-15T17:34:43+0800",
    "role": [
      "ROLE_CLIENT"
    ]
  }
]
                                https://www.marstranslation.com/api/v2/public/notifications/pushes
                                
                                    Allows user to push Notification on Mobile App.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | true | Email of user where you want to push notification | |
| 2 | pushMessage | true | Json Format Push message | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT ID HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
curl -X POST -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
             -F "email=example@gmail.com"
             -F "pushMessage={   \"message\": \"Successfully sent message\" }"
                "http://www.marstranslation.com/api/v2/public/notifications/pushes"
                                {
  "response": true
}
                                https://www.marstranslation.com/api/v2/user/details
                                
                                    This method will be used to get detail of any user with access_token or user_id.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | user_id | false | User Id. If this id is null then this call will returns logged in user details otherwise it will return according to given user id. | 
curl -X GET "http://www.marstranslation.com/api/v2/user/details?access_token={{ACCESS-TOKEN}}&user_id=15"
                                {
  "user_id": 9,
  "first_name": "user",
  "last_name": "user",
  "email": "example@gmail.com",
  "phone": "123456789",
  "picture": "default.png",
  "credit": "84446.98",
  "skype_id": "skypename",
  "twitter_id": "twitterid",
  "linkedIn_id": "linkedin",
  "is_translator": false,
  "industries": [],
  "language_pairs_detail": [],
  "certifications": []
}
                                https://www.marstranslation.com/api/v2/user/credit/details
                                
                                    This method will return available Mars credits.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
curl -X GET -H "Authorization: Bearer  YTliN2I2M2Q2NTFhNWI4MjJlYWY4OWI0OTlmOGE4NGRiNjdiOTgzMWU3ZGQwYTRkZmNhNjc3MjczNzFjNjkyZQ"
            "https://www.marstranslation.com/api/v2/user/credit/details?access_token={{ACCESS-TOKEN}}"
                                {
  "credit": "84446.98"
}
                                https://www.marstranslation.com/api/v2/transaction/list
                                
                                    Allows user to get all transactions.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | page | false | Page number for pagination | 
| 2 | records_per_page | false | default=10, number of pages record | 
curl -X GET "https://www.marstranslation.com/api/v2/transaction/list?access_token={{ACCESS-TOKEN}}&page=2&records_per_page=15"
                                {
  "history": {
    "0": {
      "order_id": 637,
      "user_id": 9,
      "type": "Place Order",
      "debit_or_credit": 2,
      "date_created": "2016-08-23T18:50:13+0800",
      "balance": 85346.98,
      "amount": 100,
      "description": "Order#637 placed through credits."
    },
    "1": {
      "order_id": 635,
      "user_id": 9,
      "type": "Place Order",
      "debit_or_credit": 2,
      "date_created": "2016-08-23T18:48:24+0800",
      "balance": 85546.98,
      "amount": 100,
      "description": "Order#635 placed through credits."
    },
    .
    .
    .
    "pages": {
      "current_page": "2",
      "next_page": 3,
      "previous_page": 1,
      "total_pages": 30,
      "records_per_page": 15
    }
  }
}
                                https://www.marstranslation.com/api/v2/promotions/list
                                
                                    Allows user to get all promotions list.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | access_token | true | Authentication (Access Token) required via login call | 
curl -X GET "https://www.marstranslation.com/api/v2/promotions/list?access_token={{ACCESS-TOKEN}}"
                                [
  {
    "id": 2,
    "amount": 650,
    "credit": 4543.5
  },
  {
    "id": 4,
    "amount": 1100,
    "credit": 12089
  },
  {
    "id": 3,
    "amount": 3300,
    "credit": 102267
  },
  {
    "id": 7,
    "amount": 5500,
    "credit": 280445
  },
  {
    "id": 5,
    "amount": 9000,
    "credit": 728910
  }
]
                                https://www.marstranslation.com/api/v2/public/quotes/prices
                                
                                    This call is used getting quote for given source language, target language,
                                    industry(s), number of words.
                                
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | clientId | true | {{PUT CLIENT KEY HERE}} | 
| 2 | clientSecret | true | {{PUT CLIENT SECRET HERE}} | 
| # | Name | Required | Description | 
|---|---|---|---|
| 1 | source_language_code | true | ISO 939-3 Source Language code | 
| 2 | target_language_code | true | ISO 939-3 Target Language code comma-seperated mulitiple values | 
| 3 | industry_code | true | Industry code | 
| 4 | number_of_words | false | If you not give this parameter then u have to give parameter "text". | 
| 5 | text | false | If you not give this parameter then u have to give parameter "num_of_words". | 
curl -X POST -H "clientId: {{PUT CLIENT KEY HERE}}"
             -H "clientSecret: {{PUT CLIENT SECRET HERE}}"
             -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
             -F "source_language_code=eng"
             -F "target_language_code=ara"
             -F "industry_code=adm"
             -F "number_of_words=144"
                "https://www.marstranslation.com/api/v2/public/quotes/prices"
                                {
  "economic_package": {
    "price": 11.85,
    "delivery_time_once_start": {
      "translation_time": "50 Mins ",
      "total_time": "50 Mins "
    }
  },
  "professional_package": {
    "price_with_proofreading": 16.65,
    "delivery_time_once_start": {
      "translation_time": "50 Mins ",
      "proofreading_time": "25 Mins ",
      "total_time": "1 Hr 15 Mins "
    }
  }
}