REST API error while posting a customized Priority fields - priority-web-sdk

I'm trying to post REST API of the ORDERS form.
I have added a few customized fields to the sub form PAYMENTDEF in order to post all the credit cards information.
I'm getting the error:
'An error has occurred'
any time I'm posting the customized fields, if I remove them from the request I managed to post.
{"CUSTNAME":"5","CDES":"רועי בן מנחם","CURDATE":"2018-07-18","BOOKNUM":"2164","SHIPTO2_SUBFORM":{"NAME":"רועי בן מנחם","PHONENUM":"0507573753","ADDRESS":"דן 4","STATE":"שערי תקווה","COUNTRYNAME":"Israel","ZIP":"44810","ADDRESS2":"44"},"ORDERITEMS_SUBFORM":[{"PARTNAME":"CLEAN0044","TQUANT":1,"PRICE":19.9,"REMARK1":"","ROYY_ORDISPECS_SUBFORM":[]},{"PARTNAME":"000","TQUANT":1,"PRICE":30,"REMARK1":""}],"PAYMENTDEF_SUBFORM":{"PAYMENTCODE":"3","QPRICE":53.28,"PAYACCOUNT":"1234","PAYCODE":"","VALIDMONTH":"0124","CCUID":"123456789","CONFNUM":"09090909","ROYY_NUMBEROFPAY":"","FIRSTPAY":"","ROYY_SECONDPAYMENT":""}}
And this is my header:
https://pri.officeandmore.co.il/odata/Priority/tabula.ini/tirgul2/ORDERS

Try check if these fields are visible in the REST api service:
Request the service metadata as following:
https://pri.officeandmore.co.il/odata/Priority/tabula.ini/tirgul2/$metadata
In the result check for the PAYMENTDEF subform's metadata (search for <EntityType Name="PAYMENTDEF"> and check if your customized fields appear in the property (field) list.
If they don't appear, probably these fields are set as 'hidden fields' in the 'Priority form' or that you have permission limitations.
If they do appear, the problem is probably related to incorrect values you are trying to post to these fields. Take a look in the metadata result to see the expected values format for each of these fields.

Related

Getting RC 500 using objectFilter in users field openIdConnectUserName

I am trying to retrieve a user profile by openIdConnectUserName.
The URL is:
https://api.softlayer.com/rest/v3/SoftLayer_Account/getUsers.json?objectMask=mask[virtualGuestCount,virtualGuests.id,virtualGuests.hostname,virtualGuests.status,hardwareCount,hardware.id,hardware.hostname,hardware.hardwareStatus,userStatus,apiAuthenticationKeyCount,apiAuthenticationKeys,loginAttemptCount,successfulLoginCount,unsuccessfulLoginCount]&objectFilter={"users":{"openIdConnectUserName":{"operation":"thisguy#us.ibm.com"}}}
I am getting RC 500 with message of "Internal Server Error"
Is this a valid objectFilter field?
Attempt the query without the objectFilter. If it works, you will know it is an invalid objectFilter.
It is also possible you are querying too much data. If a query result is too large, it can return a 500 error. You can try the limit/offset parameters. This seems unlikely since you are filtering on a specific email address.
UPDATE
The error you are getting is probably due to that the response is way to big, for this reason you should use result limits (see links at the bottom).
But the main problem is because the object filter is not working properly, the reason may be due that main datatype containing openIdConnectUserName property does not have any relational property, see below for a brief explanation when this kind of issues occurs:
"Unfortunately, it's not possible to Filter MetricDataTypes, because this datatype: SoftLayer_Container_Metric_Data_Type doesn't have any relation property ..."-
SoftLayer API how to filter MetricDataTypes
As a workaround I would recommend to use another property like "email" with "managedByOpenIdConnectFlag" (which as "true" determines if this portal user is managed by IBMid federation, and email should be the same as openIdConnectUserName) added to the object mask and then use them with object filters.
Or you may use a programming language to filter by the specific property you required (openIdConnectUserName) as forum provided recommends.
P.D.: I noticed that the request you provided doesn´t have the "openIdConnectUserName" property inside the object mask for example, therefore the response would not deliver this property even of it`s properly defined in the filter, when using object filters it is required that property needed in the response, should be declared in the object mask previously.
Fore more information please see below:
solve error fetching http headers
https://sldn.softlayer.com/article/using-result-limits-softlayer-api

Socrata API missing fields

A Socrata API call is missing fields that show up through the Socrata dataset web interface. Here's a sample API call:
https://opendata.fcc.gov/resource/sr6c-syda.json?id=860970
Notice that the returned JSON doesn't include the ticket_created datetime field. But you can see that field via filtering the Ticket Id by 860970 on the web data interface here:
https://opendata.fcc.gov/Consumer-and-Government-Affairs/CGB-Consumer-Complaints-Data/3xyp-aqkj
What explains this discrepancy?
Sorry for missing this question earlier!
Can you double-check your output results? I just tried that same query and I see the ticket_created field in the output:

Django update without required fields

I'm trying to execute an update through my API. When I push an update, I do not have all the required fields, because I'm only trying to update the ones that have changed. I get a 400 "This field is required." error.
I know the field is required, but I'm trying to just update, not put in all my required fields again. This is a PUT request. This occurs before create or update are called on my serializers. It fails on the is_valid() call (which I do not override). Honestly, there isn't any relevant code to show. To fix this do I have to override is_valid and provide a password there?
For example: Password is a required field in my model. However I only push "first_name" because that's the only field that changed. I will get: password":["This field is required."].
UPDATE is possible via 2 requests: PUT and PATCH
PUT updates all the fields of the object on which the operation is to be performed. It basically iterates over all the fields and updates them one by one. Thus, if a required field is not found in the supplied data, it will raise an error.
PATCH is what we call a Partial Update. You can update only the fields that are needed to be changed. Thus, in your case change your request method to PATCH and your work will be done.
I'm not sure why it is sometimes that you look for hours for the answer, then ask, then immediately find the answer. I simply changed my request to be a 'PATCH' instead of a 'PUT'.

Unable to add/update Infusionsoft custom field

I'm trying to insert/update a custom value in Infusionsoft. The field name in IF is 'QuoteReturned'(text field). I am unable to add value to it. All other cusotm fields are getting updated.
'_QuoteReturned' => 'dffdfdfdf'
EDIT: I had to remove an old field and add the above one as my 100 custom fields limit was completed.
So this may or may not help.
I recently found out that the InfusionSoft API calls for updating Custom Fields based on the ID of the custom field.
You can GET the Custom Fields using the InfusionSoft API / docs found here:
https://developer.infusionsoft.com/docs/rest/#!/Contact/listCustomFieldsUsingGET
Basically you will be able to authenticate using your InfusionSoft Dev-portal account, along with a valid InfusionSoft account / credentials.
Create one if you don't have one yet: https://developer.infusionsoft.com/
Once you have your details you an log in at the above API page and then issue sample API requests directly from the documentation page (to see how IF would respond to the query using the InfusionSoft account you authenticated with).
When it DOES respond, it will have a list of Custom Fields along with the ID number which you can then turn around and use on the POST / Create API endpoints.
Not sure if that will help since this question seems to be more about a specific library, but I figured I would post it for anyone who is looking to use Custom Fields along with the InfusionSoft REST API.
Oh!
One more note.
POST Requests
When you do a POST to add or update data with a current client, you will need to submit an array of custom Fields, each of which will have ONLY two properties:
{
"id": {whatever ID number for the the custom field you want},
content: {Whatever value you want to assign to that custom field}
}
Every item in the array needs to have BOTH of those properties and DOES NOT refer to the Custom Field name at any point in the process. It's all by ID number and the value is ALWAYS set by the content property.

article:publisher meta tag cannot be parsed as profile

According to this update...
https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/
...I thought article:publisher (with page ID or URL) would put a like button for the representative page when shared links are posted to walls? The debugger seems to think differently... what am I missing?
Debugger info:
Object at URL 'http:// domain.com/post/' of type 'article' is invalid because the given value 'http:// www.facebook.com/mypage' for property 'article:publisher' could not be parsed as type 'profile'
article:publisher is for Facebook pages, article:author is for individuals.
The "Follow" and "Like" buttons will only appear for people who haven't already followed the author or liked the publisher page.

Resources