Jump to content

Rest API Question


OctoDev

Recommended Posts

In the Commerce part of the Rest API, you can obtain custom field values, but not the "key"? So it would return 1/0 bool, but it wouldn't have then which one it is?

 

I.e, if i make ToS Button, and it's a bool. When I try to extract that from the invoice or whatever, on the REST API. The REST API would return 1/0, but it would have absolutely ZERO information on what that specific field is, and what the name of it is?

 

IS there any way to get that? or is that simply the API lacking.

 

Link to comment
Share on other sites

On 8/23/2019 at 3:52 PM, bfarber said:

What is the key of the item, is it the custom field ID?

 

Indeed, like this:

 

stdClass Object
(
    [8] => yaya@email.com
    [12] => string
)


How it should be:
stdClass Object
(
    [email] => yaya@email.com
    [whatever] => string
)

 

It's useless from API Perspective. I was planning to code a third party parser for it, so I can manually do stuff with it. However, without automatically detecting what the fields are, i.e if it's a bool, string and what the "name" is.. It's kind of hard.

Link to comment
Share on other sites

  • 2 weeks later...
On 8/27/2019 at 4:21 PM, bfarber said:

If this is for your own purposes, your best bet is probably to store a mapping of custom fields on the front end side making the API calls so that you can apply that mapping as needed.

 

Yeah, was just hoping it would be automated so I can easily create a third party system that connects to the IPS API & handles things.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...