romdim Dylan conway

Products and Services API

embracing Analytics, Advertising, Payments and Shopping services. It is related with the store application of a Phone.

Objects

Objects Description Reference Mapping
[card] The Card object supplies all the information the Adaptive Accounts service needs to add a payment card as a funding source to a account on behalf of its holder. PayPal [Card Mapping]
[product] Represents a commercial good or service. Objects of this type MAY contain an additional fullImage property whose value is an Activity Streams Media Link to an image resource representative of the product. AS Schema [Product Mapping]
[service] Represents any form of hosted or consumable service that performs some kind of work or benefit for other entities. Examples of such objects include websites, businesses, etc. AS Schema [Service Mapping]
[shop] A physical or virtual location where someone can acquire a product or service, under a specific Etsy [Shop Mapping]

Methods

Below there are the generally supported methods that Objects from Media API support. For special cases, see every object separately.

Method Details Call Method API path Properties Response
Get a P&S object This method returns an object with its properties [REST] #GET
API_PATH/{OBJECT_ID}
OBJECT_ID A media object
Get all P&S objects for an account This method returns all the media objects that have been published under an account. The media objects are of the same type (i.e. photo, video, article, file etc.) [REST] #GET
API_PATH/{ACCOUNT_ID}/objects
e.g. API_PATH/12312313/photos
ACCOUNT_ID A list of same-type media objects
Get P&S objects for an OPENi user Gets all media objects for the authenticated user, for all her accounts, accept if they are filtered. [REST] #GET
API_PATH/{USER_ID}/objects
e.g. API_PATH/555/videos
USER_ID, accounts={ACCOUNT_ID} A list of same-type media objects
Post a P&S object to a simple account This method uploads an object to an account, given the object. [REST] #POST
API_PATH/{ACCOUNT_ID}/objects
e.g. API_PATH/12312313/photos
ACCOUNT_ID, {OBJECT}, media_content A success or error code
Post a P&S object to an aggregation This method uploads an object to an aggregation, given the object. [REST] #POST
API_PATH/{AGGREGATION_ID}/objects
e.g. API_PATH/5553_12312313/photos
AGGREGATION_ID, {OBJECT}, media_content A success or error code
Post a P&S object to multiple services This method uploads an object to multiple services, given the object and all the account_ids. [REST] #POST
API_PATH/{USER_ID}/objects
e.g. API_PATH/555/articles
{OBJECT}, media_content, accounts={ACCOUNT_ID}. USER_ID is extracted from the authorized user. A success or error code
Edit a P&S object This method can update properties and not media content. If the media_content must change, the object must be deleted and posted again as a new object. It is allowed only for the owner of the content or someone with permissions. [REST] #PUT
API_PATH/{OBJECT_ID}
OBJECT_ID A success or error code
Delete a P&S object This method deletes an object, owned by the authenticated user [REST] #DELETE
API_PATH/{OBJECT_ID}
OBJECT_ID A success or error code

Connections

Objects Description Reference Mapping
[delivery] An order that has been delivered. [Delivery Mapping]
[invoice] a commercial document issued by a seller to a buyer indicating the products, quantities and agreed prices for products or services that the seller has already provided the buyer with. An invoice indicates that, unless paid in advance, payment is due by the buyer to the seller, according to the agreed terms. One or more invoices may apply to an order. EBay [Invoice Mapping]
[offer] Represents an offer of any kind (AS Schema). Coupon. AS Schema [Offer Mapping]
[payment] The financial transaction for an order. [Payment Mapping]
[refund] The returned payment in an account. [Refund Mapping]
[review] Represents a primarily prose-based commentary on another object. Objects of this type MAY contain a rating property. AS Schema [Review Mapping]
[score] The result of a gaming activity, for a user. It is connected to a ([game]-not anymore) [application] object [Score Mapping]
[shipping] An order that is under way to get delivered. [Shipping Mapping]

Methods

Method Details Call Method API path Properties Response
Create a connection to a P&S object or aggregation [REST] #POST
API_PATH/{OBJECT_ID}/connections
e.g. API_PATH/{SHOP_ID}/review
OBJECT_ID, accounts={ACCOUNT_ID} A success or error code
Update a connection to a P&S object or aggregation This method updates a connection to a Product and Services object. The authenticated user must one the account that has created the connection initially. [REST] #PUT
API_PATH/{CONNECTION_ID}
CONNECTION_ID, {object} A success or error code
Delete a connection to a P&S object or aggregation This method deletes a connection from a Product and Services object. This method can be performed either by the owner of the connection or the owner of the object. [REST] #DELETE
API_PATH/{CONNECTION_ID}
CONNECTION_ID A success or error code
Get connections for a P&S object or aggregation This method returns all the connections for a given object. [REST] #GET
API_PATH/{OBJECT_ID}/connections
e.g. API_PATH/{ORDER_ID}/deliveries
OBJECT_ID A list of connections

Aggregations

Aggregations Description Reference Mapping
[cart] Represents a shopping cart of products and/or services Etsy [Cart Mapping]
[order] A bought cart of products or/and services, not delivered or not shipped yet. [Order Mapping]
[wallet] A list of paying methods (cards) [Wallet Mapping]

Methods

Method Details Call Method API path Properties Response
Get an aggregation This method returns an aggregation with its properties [REST] #GET
API_PATH/{AGGEGATION_ID}
AGGEGATION_ID An aggregation object, with attached a list of its objects.
Get all aggregations for an account This method returns all the required aggregations that have been published under an account. The aggregations are of the same type (i.e. folder, album, playlist etc.) [REST] #GET
API_PATH/{ACCOUNT_ID}/aggegations
e.g. API_PATH/12312313/albums
ACCOUNT_ID A list of same-type aggregations
Get aggregations for an OPENi user Gets all aggregations for the authenticated user, for all her accounts, unless they are filtered. [REST] #GET
API_PATH/me/aggregations
e.g. API_PATH/555/orders
accounts={ACCOUNT_ID} A list of same-type aggregations
Create an aggregation This method creates an aggregation to an account, given the aggregation. [REST] #POST
API_PATH/{ACCOUNT_ID}/aggregations
e.g. API_PATH/12312313/wallet
ACCOUNT_ID, {AGGREGATION} A success or error code
Edit an aggregation This method can update properties of an aggregation. It is allowed only for the owner of the content or someone with permissions. [REST] #PUT
API_PATH/{AGGREGATION_ID}
AGGREGATION_ID, {AGGREGATION} A success or error code
Delete an aggregation This method deletes an aggregation, owned by the authenticated user [REST] #DELETE
API_PATH/{AGGREGATION_ID}
AGGREGATION_ID A success or error code

References


Related

Wiki: REST
Wiki: wallet
Wiki: Wallet Mapping
Wiki: order
Wiki: cart
Wiki: shipping
Wiki: score
Wiki: game
Wiki: application
Wiki: Score Mapping
Wiki: review
Wiki: Review Mapping
Wiki: payment
Wiki: offer
Wiki: invoice
Wiki: delivery
Wiki: shop
Wiki: Shop Mapping
Wiki: service
Wiki: Service Mapping
Wiki: product
Wiki: Product Mapping
Wiki: card
Wiki: Card Mapping
Wiki: T31-_OPENi_APIs_Specification
Wiki: T3.1- OPENi APIs Specification