What id to use and how - API create an inventory Item

edited December 2013 in API Vote Up0Vote Down
Hi Lawrence,

First of all, I'm new to Brick owl and I want to say thank you for creating such a great website. I see a lot of potential here and I'm pretty sure it would be a great community soon.

I have a question regarding the inventory create API. I have a local database and I'm trying to integrate it with BO. So to create a new inventory item we need an ID. What ID should I use, I tried several ids without success. I was able to use get and post to get data and update a record, so I have my key and other requirements in place. I'm using PHP and Curl to make a post. here is my array that I'm trying to post but it fails.

$params = array('key' => 'mykey','design_id'=> '3001','color_id'=>'86','quantity' => '5','condition'=>'new','price' => '.77');

the error that I get back is : {"error":{"status":"You did not provide any ID"}}

Now if I try boid the error is : {"error":{"status":"You cannot provide a colored Item ID and color ID"}} ---- this for example is for biod=>771344

Could I use design_id ? if yes, how ? if no, what could I use as id and in what format ?

I really appreciate your help.

Comments

  • 10 Comments sorted by Votes Date Added
  • edited December 2013 Vote Up0Vote Down
    Not a clue but what about using 771344-86 as your design id with no color id?
  • Not a clue but what about using 771344-86 as your design id with no color id?
    I checked that too, the same error of "You did not provide any ID", so I think API only accept specific ID(s) as argument.
  • Did you try using 'id' => '3001' instead of using 'design_id'.
    I have not tried it so I don't know if it would work.
  • Did you try using 'id' => '3001' instead of using 'design_id'.
    I have not tried it so I don't know if it would work.
    Yes, I tried that too. same reply of "You did not provide any ID" :)

    Thanks anyway for your reply.
  • Thanks DagsBricks, I tried your suggested method again and I got a reply. I'm pretty sure I had tried that before without success.

    Alright, It seems that the API accepts "boid" as ID and when you use boid you should not pass any color_id, but boid should be in the form of "the id-color id" ! . so here is an example of what I successfully posted:

    $params = array('key' => 'mykey','boid'=>'771344-48','quantity' => '5','condition'=>'new','price' => '.77');

    Now I think we need to get boid through catalog. I wish we had an easier way of doing it. For example if the API could be called using design_id that would be great.

    Are you guys able to get the boid form catalog, I'm not sure if I have access to read the catalog or not. The check box for catalog access in my API key setting page is grayed out, so I assume I should not have access to catalog at the moment. If you guys have any idea please let me know.

    Lawrence, I would appreciate your input since you know what's going on in the background.

    Thanks
  • I would guess admin is on a well deserved vacation.

    I do know he has said often the API is being developed as things are asked for, and encourages requests for options.

    time....

  • Now I think we need to get boid through catalog. I wish we had an easier way of doing it. For example if the API could be called using design_id that would be great.

    Are you guys able to get the boid form catalog, I'm not sure if I have access to read the catalog or not. The check box for catalog access in my API key setting page is grayed out, so I assume I should not have access to catalog at the moment. If you guys have any idea please let me know.
    You can get the boid using the "ID Lookup" API but if that box is greyed out you might not have access.

  • @technobrick To access the catalogue API you need permission, e-mail us from the contact page and we can sort that out.

    I thought it mentioned it on the documentation, but it did not so I've added that now.
  • Thank you guys,

    @SuperBrick Thanks for your help.

    @Lawrence email for permission to catalog sent.

Sign In or Register to comment.