API Description

The API supports the following POST methods:

CREATE (http://myams.net/api/create.<format>)

Format can be xml or json.

Parameters Details
login, password required, your customer credentials.
type_id required, article type ID (numeric)
keyword required, article keyword
additional_keywords optional
text, keyword #paragraph, one per line
rush optional, boolean (0 or 1), 1 for rush orders
tagging optional, boolean (0 or 1), 1 if required tagging keywords
categories optional, boolean (0 or 1), 1 if required categories choosed from the list
internal_id optional, customer internal order ID (string, 32 chars max)
internal_customer_id optional, customer internal user ID (string, 32 chars max)
callback optional, URL where to send notifications about the article status
Notifications are sent as GET requests with the following parameters:
‘id’: (unique article ID);
‘status’:will be ‘finished’ when article is ready to download,
‘submitted’: when article is submitted,
‘report’: when submission report is ready,
‘created’: for recurring orders;
‘writer_id’: (unique ID or a writer who created the article);
‘comment’: comments to the article
extra_titles optional, numeric set (0/25/50), how many additional titles you need
extra_boxes optional, numeric set (0/1/40/100/200), how many resource boxes you need
resource_keywords optional, text: keywords for resource boxes, one per line
resource_urls optional, text: URLs for resource boxes, one per line, can be with or without leading http://
forbidden_words optional, text: keywords not allowed to be used in the article/title, one per line
recurring_order_counter optional, how many recurring orders to create
start_date optional, start date for postponed orders (YYYY-MM-DD)
order_instructions optional, instructions for a writer
order_box_instructions optional, instructions for a resource box writer
order_submit_instructions optional, submission instructions
force_proof optional, boolean (0 or 1), 1 if required proof read
force_proof2 optional, boolean (0 or 1), 1 if required double proof read
random_keywords optional, boolean (0 or 1), 1 to use random RB keywords
fill_up optional, boolean (0 or 1), 1 to add random keywords to existing resource_keywords parameter
url_variation optional, boolean (0 or 1), 1 to get 4 variations of 1st resource URL, requires random_keywords,
overwrites resource_urls!
testonly optional, boolean (0 or 1), 1 if you don’t want to create an order, but only test the API
Order fields will be returned on success, or error message if something goes wrong.

Response:

<rsp stat=”ok”>
<order>
<id>11111</id>
<type>400+</type>
<keyword>keyword1</keyword>
</order>
</rsp>

 
‘id’ element contains unique order ID that should be used in next api calls.

DOWNLOAD (http://myams.net/api/download.<format>)

Format can be xml, json or zip.

Parameter Details
login, password: required, your customer credentials.
id: required, unique article ID given in ‘create’ method response

Response:

<rsp stat=”ok”>
<id>20798</id>
<keyword>test article</keyword>
<text>test text here</text>
<text>title2 here
text2 here
</text>
<text>text 3</text>
</rsp>

 
There will be 3 ‘text’ elements for UAW articles. Each text element contains one article (title and text).
Titles are not separated from the text.

DOWNLOAD ALL FINISHED ARTICLES FOR GIVEN PROJECT (http://myams.net/api/downloadproject.<format>)

Format can be ‘zip’ only.

Parameter Details
login, password: required, your customer credentials.
project: required, project name to download

Response:
ZIP file containing all finished articles or error if none found.

DOWNLOAD ALL REPORTS FOR GIVEN ORDER (http://myams.net/api/downloadreport.<format>)

Parameter Details
login, password: required, your customer credentials.
id: required, required, AMS order ID

Response:
ZIP file containing all finished articles or error if none found.

GETSTATUS (http://myams.net/api/getstatus.<format>)

Format can be xml or json.

Parameter Details
id (required): order unique ID

Response:

<rsp stat=”ok”>
<id>20798</id>
<keyword>test article</keyword>
<code>10</code>
<status>finished</status>
</rsp>

 

Codes and statuses:

0 (pending)

1 (assigned)

2 (submitted)

3 (reassigned)

4 (approved)

10 (finished)

SUSPEND (http://myams.net/api/suspend.<format>)

Suspends recurring order. Format can be xml or json.

Parameter Details
id(required) order unique ID

RESUME (http://myams.net/api/resume.<format>)

Resumes recurring order. Format can be xml or json.

Parameter Details
id(required) order unique ID

PAUSE (http://myams.net/api/pause.<format>)

Pauses given order if it’s not assigned to a writer yet. Format can be xml or json.

Parameter Details
id(required) order unique ID
comment(required) comment text

UNPAUSE (http://myams.net/api/unpause.<format>)

Unpauses given order. Format can be xml or json.

Parameter Details
id(required) order unique ID

CANCEL (http://myams.net/api/cancel.<format>)

Removes given order if it’s not assigned to a writer yet. Format can be xml or json.

Parameter Details
id(required) order unique ID
comment(required) text comment

REJECT (http://myams.net/api/reject.<format>)

Rejects given order. Format can be xml or json.

Parameter Details
id (required) order unique ID
comment (optional) customer’s comment about rejected article
callback (optional) URL where to send notifications about the article status

GET THE BALANCE (http://myams.net/api/getbalance.<format>)

Getting the balance. Format can be xml or json.

Parameter Details
login, password required, your customer credentials.

DOWNLOAD OPEN ORDERS (http://myams.net/api/listopen.<format>)

Format can be xml or json.

Parameter Details
login, password required, your customer credentials

Response:
CSV file.

DOWNLOAD FINISHED ORDERS (http://myams.net/api/listfinished.<format>)

Format can be xml or json.

Parameter Details
login, password required, your customer credentials

Response:
CSV file.

DOWNLOAD ARCHIVED ORDERS (http://myams.net/api/listarchived.<format>)

Format can be xml or json.

Parameter Details
login, password required, your customer credentials

Response:
CSV file.

DOWNLOAD PAYMENT HISTORY (http://myams.net/api/listpayments.<format>)

Format can be xml or json.

Parameter Details
login, password required, your customer credentials

Response:
CSV file.

DOWNLOAD PAYMENT RATES (http://myams.net/api/listrates.<format>)

Format can be xml or json.

Parameter Details
login, password required, your customer credentials

Response:
Three arrays: “rates”, “titles” and “boxes” with same information as on “My Rates” page in your customer area.

SEARCH FOR ORDERS (http://myams.net/api/listsearch.<format>)

Format can be xml or json.

Parameter Details
login, password required, your customer credentials
term required, text to search
where optional, can be ‘id’: search by order ID, ‘type’: search by order type, ‘project’: search in project names only, ‘text’: search article text only, ‘title’: search in titles only, ‘box’: search in resource boxes only, ‘rbkey’: search in resource boxes keywords only

Response:
CSV file or error 103(“No matching records found”) if no results found.

CREATE ACCOUNT (http://myams.net/api/createaccount.<format>)

Format can be xml or json.

Parameter Details
login, password required, your customer credentials.
paypal required, paypal name for new customer
pass required, at least 6 chars, password for the new customer
login, password required, your customer credentials
email1 required, your customer credentials
email2 optional, additional email
fullname optional, full name of the customer

Response:

{
“rsp”: {
“stat”: “ok”,
“id”: “2637”}
}

‘id’ element contains unique customer ID.

Here is a sample of error response:

<rsp stat=”fail”>
<err code=”101″ msg=”Wrong login or password”/>
</rsp>