+1 (888) 674-2299

30,771,741 Royalty Free Stock Photos

How to use the Fotolia API

Method: shoppingcart.update

This methods allows you to update one or more files into the shopping cart.

Authentication

This method requires authentication.

Arguments

Argument Type Valid Values Default Value Detail
api_key string Valid Values required you need a valid api key to use the API
session_id string Valid session ID required authentified session ID( use loginUser to create a session ID)
id int Valid media ID required Media ID (ID of the Media whose you want to purchase a license)
license_name string existing license name for this Media ID NULL Media license name

Returned Values

Element (path) Name Type Description
void

Example Query using only one media ID


<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
  <methodName>shoppingcart.update</methodName>
  <params>
    <param>
      <value>
        <string>YOUR_API_KEY</string>
      </value>
    </param>
    <param>
      <value>
        <string>SESSION_ID</string>
      </value>
    </param>
    <param>
      <value>
        <int>15446940</int>
      </value>
    </param>
    <param>
      <value>
        <string>XS</string>
      </value>
    </param>
  </params>
</methodCall>

Example Query using multiple media IDs


<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
  <methodName>shoppingcart.update</methodName>
  <params>
    <param>
      <value>
        <string>YOUR_API_KEY</string>
      </value>
    </param>
    <param>
      <value>
        <string>SESSION_ID</string>
      </value>
    </param>
    <param>
      <value>
        <array>
          <data>
            <value>
              <int>15446940</int>
            </value>
            <value>
              <int>5157391</int>
            </value>
          </data>
        </array>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>15446940</name>
            <value>
              <string>XS</string>
            </value>
          </member>
          <member>
            <name>5157391</name>
            <value>
              <string>L</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

Example Response


<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <string/>
      </value>
    </param>
  </params>
</methodResponse>

Error Codes

001: Service currently unavailable
The requested service is temporarily unavailable.
002: Failed to parse request
The XML-RPC request document could not be parsed.
010: Missing API Key
The API key passed is missing.
011: Invalid API Key
The API key passed is not valid or has expired.
020: Missing Session ID
The session ID passed is missing. A valid session ID is needed to access this method
021: Invalid Session ID
The session ID passed is not valid. Please login to get a valid session ID.
031: Invalid Method
This method does not exist in the method list.
032: Method not Available
This method is not available for this API Key.
100: Missing Media ID
The media ID is missing. Media ID is required for this method.
101: Invalid Media ID
The media ID passed is not valid or doesn't correspond to any media.
2200: Missing License Name
The License Name is needed to purchase a media.
2201: Invalid License Name
The License Name passed is not valid, doesn't exist or is not available for this media