Ask for advice. The company wants me to connect to another website platform to implement data interfaces. who has done this. Come in and have a chat.

Source: Internet
Author: User
Ask for advice. The company wants me to connect to another website platform to implement data interfaces. who has done this. Come in and have a chat. How can I create an api for the other party to call? it is an api. the returned data format is json and the https request protocol. This interface is used to display some data in the company's website database on the target platform. I have already discussed with the other platform. They gave me the interface development document, as long as I have a data interface for them. I am a newbie. I developed the interface for the first time. I am not very familiar with the documentation. I have no idea at all. Hope you can give us some advice. Thank you!


Reply to discussion (solution)

Now that you have an interface development document, post it for a look.

Now that you have an interface development document, post it for a look.

Okay.

III. Interface overview
There are two types of data required for the rice bag 360:
? List of daily transactions. It refers to the set of targets for successful daily transactions to enter the repayment phase.
? The Daily Standard list is added. Indicates the set of targets that are released each day and are still in the bidding stage.
The two types of data are queried by date. the returned data is an array containing several entries of data. For more information, see the supplementary description at the end of this section.
Interface request protocol: http or https
Interface request parameters: request parameters
? Query date: date = 20140730 (the month and day of a single digit must contain the leading 0, for example, the parameter for January 1, July 3, 2014 is 20140703)
? List type: type = success/new (success is the list of transaction targets, and new is the list of new targets)
? Verification field: token, username, and password. For more information, see the "request verification method" section.
Returned data format: json
Request verification methods: There are three optional verification methods available for the platform.
? The request parameters include the verification field that the platform assigns to bag 360. This field can be set to one or more fields with unlimited field names and values. For example:
Username: medai360
Password: 12345678
? Token method: obtain the available token through an address set on the platform, and then use the token to obtain the target list. Example of a token to obtain an address:
Http (s): // www.platform.com/api/token? Date = 20140730 & username = medai360 & password = 12345678
The username and password in the parameter are the username and password prepared for the rice bag 360 on the platform.
Returned data (text format ):
Correct request: token = 1wegsdgy3e4u623tf78hv%32478ya5 (string: token = 32-bit token string, 38 characters in total)
Request error: error
? Public interface, no verification required. In this case, any request can return json data.
The platform can select the verification method as needed. And send the required verification parameters to the rice bag 360 by email. Email: medai360@medai360.com
Finally, two complete interface url examples:
Http (s): // www.platform.com/api/loans/success? Date = 20140730 & username = medai360 & password = 12345678
Http (s): // www.platform.com/api/loans/success? Date = 20140730 & token = 1wegsdgy3e4u623tf78hv1_32478ya5



IV. interface return data
The two types of list return formats are the same, but the requirements for each field are different
{
"Date": "July", // The month and day of a single digit must contain a leading value of 0. for example, the value of is "07" and the value of 5 is "05"
"Loans ":[{
"Id": "1234", // subject ID. Unique Identifier
"Title": "title", // subject title
"Desc": "description", // subject description or details, in text format. It must be less than 1000 characters long. Optional
"Borrower": "borrower", // borrower's name or user ID. Optional
"Amount": "500000", // subject amount
"Interest": "18.00", // interest rate
"Bidnum": "10", // number of bids
"Time_0": "", // The time when the tag is issued. Optional, but recommended
"Time_1": "", // full time. This parameter is optional or empty if the tag is not full.
"Time_2": "", // transaction time. Optional or empty if no deal is made
"Url": "http://www.platform.com/loans/id.html", // subject page address

Table corresponding to the type mark and meaning of the mark (bold is a more important type, and you want to strictly follow it)
Type flag meaning
Jingzhi net worth Mark
Tian Tianbiao
Jiangli rewards
Diya collateral
Xinyong credit mark
Tuijian recommendation
Danbao warranty mark
Qiye Enterprise logo
Tiyan experience logo/newbie logo
Liuzhuan
Bao Assurance Standard/warranty standard
Licai financial standard
Miao second mark
Dingxiang
Dingshi time Mark
Yuyue bidding Reservation

Text? No? ? Is it clear? Do you do it by hand? And where? Fang? Connect or move on ??, Where are you? Where is there ?? What about it?

The document is clearly written. you can obtain and output the file in json format.

The document is clearly written, and the rest is the processing of the business logic. It should not be a problem

PHP parses JOSN data as an object and then processes it.

No valuable replies

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.