File Resource
URLs and Supported Requests
The Article Exchange API Resource supports two operations.
Operation | Resource URL | HTTP METHOD |
---|---|---|
Upload | https://ill.sd00.worldcat.org/articleexchange/?autho=[ID]&password=[password] | POST |
Download | https://ill.sd00.worldcat.org/articleexchange/?shorturl=[url]&password=[password] | GET |
Multipart HTTP Request
To POST a document requires a binary file being uploaded with one of the following MIME Types.You must set the content-type within the body of the multipart request and it must match one of the following MIME Types:
- image/jpeg
- image/jp2
- image/jpx
- image/jpm
- image/tiff
- image/png
- image/gif
- image/bmp
- application/pdf
- image/vnd.ms-modi
- application/zip
HTTP Responses
Upload Responses
The response to an HTTP request to upload a file will return in XML or JSON depending on what the client sent in the HTTP Accept header
Download Responses
When a successful download operation is executed the requested binary file will be returned. The file is returned without any wrapper document and in the format it was originally uploaded. The web service returns the following headers to assist the client with handling the document returned.
- Content-Type - Media type of the file. For example, application/pdf, image/jpeg, image/tiff
- Content-deposition - header to alert client to allow user to choose where to save the file
- Content-Length - size of the file
HTTP Accept Types
Clients can specify the type of document they are willing to accept using the HTTP Accept Header. The following Accept Headers are valid:
- image/jpeg
- image/jp2
- image/jpx
- image/jpm
- image/tiff
- image/png
- image/gif
- image/bmp
Parameters
Upload
Parameter | Required | Description |
---|---|---|
autho | Yes | OCLC authorization number |
password | Yes | OCLC password corresponding to the autho |
requesterInstSymbol | No | Requester OCLC symbol |
requesterEmail | No | Requester email address |
oclcRequestId | No | OCLC ILL Request number |
illiadRequestId | No | Illiad transaction number |
vdxRequestId | No | VDX request number |
jTitle | No | Journal Title |
aTitle | No | Article Title |
aAuthor | No | Article Author |
aVolume | No | Article Volume |
aIssue | No | Article Issue |
aDate | No | Article Date |
aPages | No | Article Pages |
Download
Parameter | Required | Description |
---|---|---|
password | Yes | OCLC password |
shorturlShort | Yes | URL for accessing the document. |
Example URLs
Download Example
POST /articleexchange//articleexchange/?autho=102-900-527&password=test HTTP/1.1
Host: ill.sd00.worldcat.org
Connection: close
User-Agent: Platform PHP Test Client
Accept: application/atom+xml
Authorization: http://www.worldcat.org/wskey/v2/hmac/v1 clientId="tsFsoBXToV1uR8GEMJCcxz9NYpVvutsA5cJAD9cnKUc4FGYEntM6UkcIVlYp4ZhYFteVLAxOWJDUV85W", timestamp="1362760533", nonce="44543195", signature="jgyjfRoPEzDotNq+yEzjRXydp/sFGxWtOPJQ2gBnnQE="
Content-Type: multipart/form-data; boundary=---HTTPCLIENT-364df2d228844ecc0b45d28d93758f98
Content-Length: 245
-----HTTPCLIENT-364df2d228844ecc0b45d28d93758f98
Content-Disposition: form-data; name="Article Upload"; filename="test_pdf.pdf"
Content-Type: application/pdf
Article Upload
-----HTTPCLIENT-364df2d228844ecc0b45d28d93758f98--
Upload Example
To POST a binary file to the Article exchange API:
https://ill.sd00.worldcat.org/articleexchange/?autho=[id]&password=[password]&requesterEmail=test@oclc.org&requesterInstSymbol=BOR&oclcRequestId=28374239487&illiadRequestId=2394879823&vdxRequestId=vdx:23987234&jTitle=The%20Journal%20Title&aTitle=The%20Article%20Title&aAuthor=Iam%20The%20Author&aVolume=1&aIssue=35&aDate=June%205&aPages=55
XML Response
JSON Response