Tpshop App Backend Interface specification

Source: Internet
Author: User
Tags api manual

This Article directory: Interface specification interface Sample reference documentation


Recently, in the collation and development of Tpshop Open Source Mall app (including Android and iOS) background interface (API), summed up.



1. Interface Specification

The URL for an interface is generally:
Official website domain name/index.php?m=api&c= Controller &a= method

The return data type is in JSON format, in the form:

{
  "status": 1,
  "msg": "Get Success",
  "result": "Data Sample"
}

Where the "status" and "MSG" fields are generally fixed.
"Status" is normally 1, and other values are not normal or error. The word "MSG" describes the results.
"Result" is typically the dataset returned by the Get method.

Description
M=api is actually a module in the thinkphp framework called the API, and other common modules are home and mobile, the corresponding PC and mobile version of the web,admin and seller corresponding administrator background and sales management backstage.

Methods are generally named in lowercase + underscores, and some still retain the hump-style naming for historical reasons.



2. Interface Example

As follows:



Main reference documents:

Tpshop Mobile API Manual

-end-

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.